---
include: rocblas_common.yaml
include: known_bugs.yaml

Definitions:
  - &small_matrix_size_range
    - { M:    -1, N:    -1, lda:     1, ldb:     1 }
    - { M:    10, N:    10, lda:    20, ldb:   100 }

    # These were previously failing for trsm_ex
    - { M:    24, N:    33, lda:    33, ldb:    33 }
    - { M:    32, N:    33, lda:    33, ldb:    33 }
    - { M:    33, N:    32, lda:    33, ldb:    33 }

    - { M:    64, N: 65, lda: 65, ldb: 65 }
    - { M:    65, N: 64, lda: 64, ldb: 65 }

    # Trsv kernel
    - { M:   128, N:    1, lda:  128, ldb:  128 }
    - { M:  1024, N:    1, lda: 2000, ldb: 1024 }

  - &medium_matrix_size_range
    - { M:   192, N:   192, lda:   192, ldb:   192 }
    - { M:   600, N:   500, lda:   600, ldb:   600 }
    - { M:   800, N:   700, lda:   801, ldb:   701 }

  # - &substitution_size_range
    - { M:  2, N:  1, lda: 30, ldb: 30 }
    - { M:  1, N:  2, lda: 30, ldb: 30 }

    - { M: 32, N:  3, lda: 32, ldb: 32 }
    - { M: 32, N: 32, lda: 32, ldb: 32 }
    - { M: 32, N: 31, lda: 32, ldb: 32 }
    - { M: 31, N: 31, lda: 32, ldb: 32 }

    - { M: 33, N: 35, lda:  62, ldb:  61 }
    - { M: 35, N: 33, lda:  61, ldb:  62 }
    - { M:  7, N: 58, lda:  59, ldb: 130 }
    - { M: 58, N:  7, lda: 130, ldb: 129 }

    # not small
    - { M: 8, N: 128, lda: 200, ldb: 200 }
    - { M: 128, N: 8, lda: 200, ldb: 200 }

  - &medium_matrix_size_extra
    - { M:   256, N:   14848, lda:   256, ldb:   256 }

  - &large_matrix_size_range
    - { M:   640, N:   640, lda:   960, ldb:   960 }
    - { M:  1000, N:  1000, lda:  1000, ldb:  1000 }
    - { M:  1024, N:  1024, lda:  1024, ldb:  1024 }
    # - { M:  2000, N:  2000, lda:  2000, ldb:  2000 }

  - &large_memory_matrix_size_range
    - { M: 8320, N: 128, lda: 8320, ldb: 8320 }

  - &substitution_size_range_thorough
    - { M:   1, N:  1, lda: 100, ldb: 100 }
    - { M:   1, N: 32, lda: 100, ldb: 100 }
    - { M:   1, N: 64, lda: 100, ldb: 100 }
    - { M:   2, N:  1, lda: 100, ldb: 100 }
    - { M:   2, N: 32, lda: 100, ldb: 100 }
    - { M:   2, N: 64, lda: 100, ldb: 100 }
    - { M:   4, N:  1, lda: 100, ldb: 100 }
    - { M:   4, N: 32, lda: 100, ldb: 100 }
    - { M:   4, N: 64, lda: 100, ldb: 100 }
    - { M:   7, N:  1, lda: 100, ldb: 100 }
    - { M:   7, N: 32, lda: 100, ldb: 100 }
    - { M:   7, N: 64, lda: 100, ldb: 100 }
    - { M:  16, N:  1, lda: 100, ldb: 100 }
    - { M:  16, N: 32, lda: 100, ldb: 100 }
    - { M:  16, N: 64, lda: 100, ldb: 100 }
    - { M:  32, N:  1, lda: 100, ldb: 100 }
    - { M:  32, N: 32, lda: 100, ldb: 100 }
    - { M:  32, N: 64, lda: 100, ldb: 100 }
    - { M:  64, N:  1, lda: 100, ldb: 100 }
    - { M:  64, N: 32, lda: 100, ldb: 100 }
    - { M:  64, N: 64, lda: 100, ldb: 100 }
    - { M:  35, N:  7, lda:  48, ldb:  52 }
    - { M:   3, N: 61, lda:  62, ldb:  63 }

  - &substitution_size_range_skinny_left
    - { M: 31, N: 4000, lda: 4000, ldb: 4000 }
    - { M:  2, N:  256, lda:  256, ldb:  256 }

  - &substitution_size_range_skinny_right
    - { M: 4000, N: 31, lda: 4000, ldb: 4000 }
    - { M:  256, N:  2, lda:  256, ldb:  256 }

  - &alpha_range_sub
    - { alpha: 2.0 }

  - &alpha_range [ 1.0, -5.0 ]

  - &complex_alpha_range
    - { alpha: -5, alphai: -5 }
    - { alpha:  1, alphai:  3 }

  - &testset1_small_matrix_size_range
    - { M:      256,    N:      256,    lda:    256,    ldb:    256     }
    - { M:      512,    N:      256,    lda:    256,    ldb:    512     }
    - { M:      512,    N:      512,    lda:    512,    ldb:    512     }
    - { M:      768,    N:      256,    lda:    256,    ldb:    768     }
    - { M:      1024,   N:      256,    lda:    256,    ldb:    1024    }
    - { M:      1280,   N:      256,    lda:    256,    ldb:    1280    }
    - { M:      1536,   N:      256,    lda:    256,    ldb:    1536    }
    - { M:      1792,   N:      256,    lda:    256,    ldb:    1792    }
    - { M:      2048,   N:      256,    lda:    256,    ldb:    2048    }
    - { M:      384,    N:      384,    lda:    384,    ldb:    384     }
    - { M:      768,    N:      384,    lda:    384,    ldb:    768     }
    - { M:      1152,   N:      384,    lda:    384,    ldb:    1152    }
    - { M:      1536,   N:      384,    lda:    384,    ldb:    1536    }
    - { M:      1920,   N:      384,    lda:    384,    ldb:    1920    }
    - { M:      2304,   N:      384,    lda:    384,    ldb:    2304    }
    - { M:      2688,   N:      384,    lda:    384,    ldb:    2688    }
    - { M:      3072,   N:      384,    lda:    384,    ldb:    3072    }


  - &testset2_small_matrix_size_range
    - { M:      256,    N:      256,    lda:    256,    ldb:    256     }
    - { M:      256,    N:      512,    lda:    512,    ldb:    256     }
    - { M:      256,    N:      768,    lda:    768,    ldb:    256     }
    - { M:      256,    N:      1024,   lda:    1024,   ldb:    256     }
    - { M:      256,    N:      1280,   lda:    1280,   ldb:    256     }
    - { M:      256,    N:      1536,   lda:    1536,   ldb:    256     }
    - { M:      256,    N:      1792,   lda:    1792,   ldb:    256     }
    - { M:      256,    N:      2048,   lda:    2048,   ldb:    256     }
    - { M:      384,    N:      384,    lda:    384,    ldb:    384     }
    - { M:      384,    N:      768,    lda:    768,    ldb:    384     }
    - { M:      384,    N:      1152,   lda:    1152,   ldb:    384     }
    - { M:      384,    N:      1536,   lda:    1536,   ldb:    384     }
    - { M:      384,    N:      1920,   lda:    1920,   ldb:    384     }
    - { M:      384,    N:      2304,   lda:    2304,   ldb:    384     }
    - { M:      384,    N:      2688,   lda:    2688,   ldb:    384     }
    - { M:      384,    N:      3072,   lda:    3072,   ldb:    384     }


  - &testset1_matrix_size_range
    - { M:   128, N:    2048, lda:   128, ldb:   128 }
    - { M:   128, N:   16848, lda:   128, ldb:   128 }
    - { M:   128, N:   29696, lda:   128, ldb:   128 }
    - { M:   128, N:   44544, lda:   128, ldb:   128 }
    - { M:   128, N:   53632, lda:   128, ldb:   128 }
    - { M:   256, N:    2048, lda:   256, ldb:   256 }
    - { M:   256, N:   29696, lda:   256, ldb:   256 }
    - { M:   256, N:   44544, lda:   256, ldb:   256 }
    - { M:   256, N:   53504, lda:   256, ldb:   256 }
    - { M:   384, N:    2048, lda:   384, ldb:   384 }
    - { M:   384, N:   14976, lda:   384, ldb:   384 }
    - { M:   384, N:   29952, lda:   384, ldb:   384 }
    - { M:   384, N:   44928, lda:   384, ldb:   384 }
    - { M:   384, N:   53376, lda:   384, ldb:   384 }

  - &testset2_matrix_size_range
    - { M:   2048,  N: 128,  lda:  2048, ldb:    2048 }
    - { M:  16848,  N: 128,  lda: 16848, ldb:   16848 }
    - { M:  29696,  N: 128,  lda: 29696, ldb:   29696 }
    - { M:  44544,  N: 128,  lda: 44544, ldb:   44544 }
    - { M:  53632,  N: 128,  lda: 53632, ldb:   53632 }
    - { M:   2048,  N: 256,  lda:  2048, ldb:    2048 }
    - { M:  14848,  N: 256,  lda: 14848, ldb:   14848 }
    - { M:  29696,  N: 256,  lda: 29696, ldb:   29696 }
    - { M:  44544,  N: 256,  lda: 44544, ldb:   44544 }
    - { M:  53504,  N: 256,  lda: 53504, ldb:   53504 }
    - { M:   2048,  N: 384,  lda:  2048, ldb:    2048 }
    - { M:  14976,  N: 384,  lda: 14976, ldb:   14976 }
    - { M:  29952,  N: 384,  lda: 29952, ldb:   29952 }
    - { M:  44928,  N: 384,  lda: 44928, ldb:   44928 }
    - { M:  53376,  N: 384,  lda: 53376, ldb:   53376 }


Tests:

# Small - quick
- name: trsm_small
  category: quick
  function: trsm
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

- name: trsm_small_complex
  category: quick
  function: trsm
  precision: *single_double_precisions_complex
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

- name: trsm_batched_small
  category: quick
  function: trsm_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  batch_count: [-1, 0, 1, 3]
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

- name: trsm_batched_small_complex
  category: quick
  function: trsm_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range
  batch_count: [-1, 0, 1, 3]
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

- name: trsm_strided_batched_small
  category: quick
  function: trsm_strided_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1 ]
  batch_count: [ -1, 0, 1, 3 ]
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

- name: trsm_strided_batched_small_complex
  category: quick
  function: trsm_strided_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range
  stride_scale: [ 3 ]
  batch_count: [ -1, 0, 1, 3 ]
  fortran: [ false, true ]
  user_allocated_workspace: [0, 1000000]

# Medium - pre_checkin
- name: trsm_medium_HMM
  category: HMM
  function: trsm
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *medium_matrix_size_range
  alpha: 1
  user_allocated_workspace: [0, 20000000]
  HMM: true

- name: trsm_medium
  category: pre_checkin
  function: trsm
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range
  user_allocated_workspace: [0, 20000000]

- name: trsm_medium_extra
  category: pre_checkin
  function: trsm
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *medium_matrix_size_extra
  alpha: [ 1 ]
  user_allocated_workspace: [0, 20000000]

- name: trsm_medium_complex
  category: pre_checkin
  function: trsm
  precision: *single_double_precisions_complex
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *medium_matrix_size_range
  alpha_beta: *complex_alpha_range
  user_allocated_workspace: [0, 20000000]
# if adjusting algo add back in for local testing
#  pad: [0, 4096]

- name: trsm_batched_medium
  category: pre_checkin
  function: trsm_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range
  batch_count: [3]
  user_allocated_workspace: [0, 20000000]
# if adjusting algo add back in for local testing
#  pad: [0, 4096]

- name: trsm_batched_medium_complex
  category: pre_checkin
  function: trsm_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha_beta: *complex_alpha_range
  batch_count: [3]
  user_allocated_workspace: [0, 20000000]
# if adjusting algo add back in for local testing
#  pad: [0, 4096]

- name: trsm_strided_batched_medium
  category: pre_checkin
  function: trsm_strided_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1 ]
  batch_count: [ 3 ]
  user_allocated_workspace: [0, 20000000]

- name: trsm_strided_batched_medium_complex
  category: pre_checkin
  function: trsm_strided_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha_beta: *complex_alpha_range
  stride_scale: [ 3 ]
  batch_count: [ 3 ]
  user_allocated_workspace: [0, 20000000]

# nightly
- name: trsm_medium_multi_gpu
  category: multi_gpu
  function: trsm
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N]
  diag: [N]
  threads_streams: *common_threads_streams
  matrix_size: *medium_matrix_size_range
  alpha: 1
  devices: [0, 2, 4]

- name: trsm_medium_multi_threads_streams
  category: nightly
  function: trsm
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  threads_streams: *common_threads_streams
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range

- name: trsm_testset1
  category: nightly
  function: trsm
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]

- name: trsm_testset2
  category: nightly
  function: trsm
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]

- name: trsm_large
  category: nightly
  function: trsm
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range

- name: trsm_large_complex
  category: nightly
  function: trsm
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha_beta: *complex_alpha_range

- name: trsm_batched_testset1
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]
  batch_count: [ 2 ]

- name: trsm_batched_testset2
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]
  batch_count: [ 2 ]

- name: trsm_batched_large
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range
  batch_count: [ 2 ]

- name: trsm_batched_large_complex
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha_beta: *complex_alpha_range
  batch_count: [ 2 ]

- name: trsm_strided_batched_testset1
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

- name: trsm_strided_batched_testset2
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

- name: trsm_strided_batched_large
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

- name: trsm_strided_batched_large_complex
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha_beta: *complex_alpha_range
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

# nightly - large memory allocation
# - name: trsm_batched_largememory
#   category: nightly
#   function: trsm_batched
#   precision: *double_precision
#   side: [L]
#   uplo: [U]
#   transA: [N]
#   diag: [U]
#   matrix_size: *large_memory_matrix_size_range
#   alpha: [1]
#   batch_count: [16]

# nightly - many batches

- name: trsm_batched_manybatch
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  batch_count: [128]

- name: trsm_strided_batched_manybatch
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions
  arguments:
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: U, transA: C, diag: N }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1 ]
  batch_count: [128]

# nightly - substitution method
- name: trsm_small_left
  category: nightly
  function: trsm
  precision: *single_double_precisions_complex_real
  side: [L]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *substitution_size_range_skinny_left
  alpha_beta: *alpha_range_sub

- name: trsm_small_right
  category: nightly
  function: trsm
  precision: *single_double_precisions_complex_real
  side: [R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *substitution_size_range_skinny_right
  alpha_beta: *alpha_range_sub

- name: trsm_small_complex
  category: nightly
  function: trsm
  precision: *single_double_precisions_complex_real
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *substitution_size_range_thorough
  alpha_beta: *alpha_range_sub

- name: trsm_batched_small_left
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions_complex_real
  side: [L]
  uplo: [L, U]
  transA: [N, C]
  diag: [N]
  matrix_size: *substitution_size_range_skinny_left
  alpha_beta: *alpha_range_sub
  batch_count: [ 1, 4 ]

- name: trsm_batched_small_right
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions_complex_real
  side: [R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N]
  matrix_size: *substitution_size_range_skinny_right
  alpha_beta: *alpha_range_sub
  batch_count: [ 1, 4 ]

- name: trsm_batched_small_complex
  category: nightly
  function: trsm_batched
  precision: *single_double_precisions_complex_real
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *substitution_size_range_thorough
  alpha_beta: *alpha_range_sub
  batch_count: [ 1, 4 ]

- name: trsm_strided_batched_small_left
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions_complex_real
  side: [L]
  uplo: [L, U]
  transA: [N, C]
  diag: [U]
  matrix_size: *substitution_size_range_skinny_left
  alpha_beta: *alpha_range_sub
  stride_scale: [ 1.5]
  batch_count: [ 1, 4 ]

- name: trsm_strided_batched_small_right
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions_complex_real
  side: [R]
  uplo: [L, U]
  transA: [N, C]
  diag: [U]
  matrix_size: *substitution_size_range_skinny_right
  alpha_beta: *alpha_range_sub
  stride_scale: [ 1.5]
  batch_count: [ 1, 4 ]

- name: trsm_strided_batched_small_complex
  category: nightly
  function: trsm_strided_batched
  precision: *single_double_precisions_complex_real
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *substitution_size_range_thorough
  alpha_beta: *alpha_range_sub
  stride_scale: [ 1.5 ]
  batch_count: [ 1, 4 ]

#############
## trsm_ex ##
#############

# Small - quick
- name: trsm_ex_small
  category: quick
  function: trsm_ex
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range

- name: trsm_ex_small_complex
  category: quick
  function: trsm_ex
  precision: *single_double_precisions_complex
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range

- name: trsm_batched_ex_small
  category: quick
  function: trsm_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  batch_count: [-1, 0, 1, 3]

- name: trsm_batched_ex_small_complex
  category: quick
  function: trsm_batched_ex
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range
  batch_count: [-1, 0, 1, 3]

- name: trsm_strided_batched_ex_small
  category: quick
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1, 3 ]
  batch_count: [-1, 0, 1, 3]

- name: trsm_strided_batched_ex_small_complex
  category: quick
  function: trsm_strided_batched_ex
  precision: *single_double_precisions_complex
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha_beta: *complex_alpha_range
  stride_scale: [ 1, 1.5 ]
  batch_count: [-1, 0, 1, 3]

# Medium - pre_checkin
- name: trsm_ex_medium
  category: pre_checkin
  function: trsm_ex
  precision: *single_double_precisions
  side: [L, R]
  uplo: [L, U]
  transA: [N, C]
  diag: [N, U]
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range

- name: trsm_batched_ex_medium
  category: pre_checkin
  function: trsm_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range
  batch_count: [1, 3]

- name: trsm_strided_batched_ex_medium
  category: pre_checkin
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *medium_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1, 1.5 ]
  batch_count: [ 1, 3 ]

- name: trsm_ex_testset1_small
  category: pre_checkin
  function: trsm_ex
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset1_small_matrix_size_range
  alpha: *alpha_range

- name: trsm_ex_testset2_small
  category: pre_checkin
  function: trsm_ex
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset2_small_matrix_size_range
  alpha: *alpha_range

# nightly
- name: trsm_ex_testset1
  category: nightly
  function: trsm_ex
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]

- name: trsm_batched_ex_testset1
  category: nightly
  function: trsm_batched_ex
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]
  batch_count: [ 2 ]

- name: trsm_strided_batched_ex_testset1
  category: nightly
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  side: [L]
  uplo: [L]
  transA: [N]
  diag: [U]
  matrix_size: *testset1_matrix_size_range
  alpha: [ 1 ]
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

- name: trsm_ex_testset2
  category: nightly
  function: trsm_ex
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]

- name: trsm_batched_ex_testset2
  category: nightly
  function: trsm_batched_ex
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]
  batch_count: [ 2 ]

- name: trsm_strided_batched_ex_testset2
  category: nightly
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  side: [R]
  uplo: [L]
  transA: [T]
  diag: [U]
  matrix_size: *testset2_matrix_size_range
  alpha: [ 1 ]
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

- name: trsm_ex_large
  category: nightly
  function: trsm_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range

- name: trsm_batched_ex_large
  category: nightly
  function: trsm_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range
  batch_count: [ 2 ]

- name: trsm_strided_batched_ex_large
  category: nightly
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: N }
    - { side: R, uplo: L, transA: N, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
  matrix_size: *large_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 2 ]
  batch_count: [ 2 ]

# nightly - many batches
- name: trsm_batched_ex_manybatch
  category: nightly
  function: trsm_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  batch_count: [64]

- name: trsm_strided_batched_ex_manybatch
  category: nightly
  function: trsm_strided_batched_ex
  precision: *single_double_precisions
  arguments:
    - { side: L, uplo: L, transA: N, diag: U }
    - { side: R, uplo: L, transA: C, diag: N }
    - { side: L, uplo: U, transA: C, diag: N }
    - { side: R, uplo: U, transA: N, diag: U }
  matrix_size: *small_matrix_size_range
  alpha: *alpha_range
  stride_scale: [ 1 ]
  batch_count: [64]
...
