---
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 }

  - &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 }

  - &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 }

  - &alpha_range [ 1.0, -5.0 ]

  - &testset1_small_matrix_size_range
    - { M:      256,  N:        256,    lda:    256,    ldb:    256     }
    - { M:      512,  N:        256,    lda:    256,    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:   14848, 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:
- 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

- 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

- 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_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_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_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_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

- name: trsm_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_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_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
...
