Skip to content

Commit

Permalink
Add emulation tests.
Browse files Browse the repository at this point in the history
  * smoke test: rtest.py --emulation smoke --install_dir ${PATH_TO_hipsparselt-test}
  * regression test: rtest.py --emulation regression --install_dir ${PATH_TO_hipsparselt-test}
  * extended test: there is no test for extened test cases.
  • Loading branch information
vin-huang committed Jan 8, 2025
1 parent 5084663 commit 1eacd9c
Show file tree
Hide file tree
Showing 13 changed files with 475 additions and 0 deletions.
24 changes: 24 additions & 0 deletions clients/gtest/compress_strided_batched_gtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,28 @@ Tests:
batch_count: 1
sparse_b: [ true, false]

- name: compress_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
compress_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 16 }
- { M: 8, N: 8, K: 32 }
- { M: 8, N: 8, K: 48 }
- { M: 8, N: 8, K: 64 }
- { M: 8, N: 8, K: 128 }
- { M: 8, N: 8, K: 192 }
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 16 }
- { M: 128, N: 128, K: 24 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 48 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 192 }
- { M: 128, N: 128, K: 256 }
sparse_b: [ true, false]
batch_count: [1, 3]
func_version: [1, 2]
...
22 changes: 22 additions & 0 deletions clients/gtest/compress_strided_batched_gtest_1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,26 @@ Tests:
transB: N
batch_count: 1
sparse_b: [ true, false]

- name: compress_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
compress_strided_batched: *real_precisions_1b_input
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
sparse_b: [ true, false]
batch_count: [1, 3]
func_version: [1, 2]
...
26 changes: 26 additions & 0 deletions clients/gtest/compress_strided_batched_gtest_1b_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,30 @@ Tests:
orderB: [R]
orderC: [R]
orderD: [R]

- name: compress_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
compress_strided_batched: *real_precisions_1b_input
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
sparse_b: [ true, false]
batch_count: [1, 3]
func_version: [1, 2]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]
...
28 changes: 28 additions & 0 deletions clients/gtest/compress_strided_batched_gtest_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,32 @@ Tests:
orderC: [R]
orderD: [R]

- name: compress_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
compress_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 16 }
- { M: 8, N: 8, K: 32 }
- { M: 8, N: 8, K: 48 }
- { M: 8, N: 8, K: 64 }
- { M: 8, N: 8, K: 128 }
- { M: 8, N: 8, K: 192 }
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 16 }
- { M: 128, N: 128, K: 24 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 48 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 192 }
- { M: 128, N: 128, K: 256 }
sparse_b: [ true, false]
batch_count: [1, 3]
func_version: [1, 2]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]
...
24 changes: 24 additions & 0 deletions clients/gtest/prune_strided_batched_gtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,28 @@ Tests:
prune_algo: [ 0, 1 ]
sparse_b: [true, false]

- name: prune_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
prune_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 16 }
- { M: 8, N: 8, K: 32 }
- { M: 8, N: 8, K: 48 }
- { M: 8, N: 8, K: 64 }
- { M: 8, N: 8, K: 128 }
- { M: 8, N: 8, K: 192 }
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 16 }
- { M: 128, N: 128, K: 24 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 48 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 192 }
- { M: 128, N: 128, K: 256 }
sparse_b: [ true, false]
batch_count: [1, 3]
prune_algo: [ 0, 1 ]
...
22 changes: 22 additions & 0 deletions clients/gtest/prune_strided_batched_gtest_1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,26 @@ Tests:
batch_count: 1
prune_algo: [ 0, 1 ]
sparse_b: [ true, false]

- name: prune_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
prune_strided_batched: *real_precisions_1b_input
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
sparse_b: [ true, false]
batch_count: [1, 3]
prune_algo: [ 0, 1 ]
...
26 changes: 26 additions & 0 deletions clients/gtest/prune_strided_batched_gtest_1b_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,30 @@ Tests:
orderB: [R]
orderC: [R]
orderD: [R]

- name: prune_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
prune_strided_batched: *real_precisions_1b_input
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
sparse_b: [ true, false]
batch_count: [1, 3]
prune_algo: [ 0, 1 ]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]
...
28 changes: 28 additions & 0 deletions clients/gtest/prune_strided_batched_gtest_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,32 @@ Tests:
orderC: [R]
orderD: [R]

- name: prune_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
prune_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 16 }
- { M: 8, N: 8, K: 32 }
- { M: 8, N: 8, K: 48 }
- { M: 8, N: 8, K: 64 }
- { M: 8, N: 8, K: 128 }
- { M: 8, N: 8, K: 192 }
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 16 }
- { M: 128, N: 128, K: 24 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 48 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 192 }
- { M: 128, N: 128, K: 256 }
sparse_b: [ true, false]
batch_count: [1, 3]
prune_algo: [ 0, 1 ]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]
...
41 changes: 41 additions & 0 deletions clients/gtest/spmm_strided_batched_gtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,45 @@ Tests:
batch_count: 1
sparse_b: [true, false]

- name: spmm_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 16 }
- { M: 8, N: 8, K: 32 }
- { M: 8, N: 8, K: 48 }
- { M: 8, N: 8, K: 64 }
- { M: 8, N: 8, K: 128 }
- { M: 8, N: 8, K: 192 }
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 16 }
- { M: 128, N: 128, K: 24 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 48 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 192 }
- { M: 128, N: 128, K: 256 }
alpha_beta: *alpha_beta_range
sparse_b: [ true, false]
batch_count: [1, 3]
alpha_vector_scaling: [true, false]

- name: spmm_strided_batched_activation_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_2b
matrix_size:
- { M: 8, N: 8, K: 256 }
- { M: 128, N: 128, K: 256 }
alpha: 1.0
beta: 0.0
sparse_b: [ true, false]
batch_count: [1, 3]
activation_type: clippedrelu
activation_arg1 : [-1.0, 0.0, 0.5]
activation_arg2 : [-1.0, 0.0, 0.5, 1.0, 3.0]
...
38 changes: 38 additions & 0 deletions clients/gtest/spmm_strided_batched_gtest_1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,42 @@ Tests:
batch_count: 1
sparse_b: [true, false]

- name: spmm_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_1b
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
alpha_beta: *alpha_beta_range
sparse_b: [ true, false]
batch_count: [1, 3]
alpha_vector_scaling: [true, false]

- name: spmm_strided_batched_activation_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_1b
matrix_size:
- { M: 16, N: 16, K: 256 }
- { M: 128, N: 128, K: 256 }
alpha: 1.0
beta: 0.0
sparse_b: [ true, false]
batch_count: [1, 3]
activation_type: clippedrelu
activation_arg1 : [-1.0, 0.0, 0.5]
activation_arg2 : [-1.0, 0.0, 0.5, 1.0, 3.0]
...
46 changes: 46 additions & 0 deletions clients/gtest/spmm_strided_batched_gtest_1b_row.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,50 @@ Tests:
orderC: [R]
orderD: [R]

- name: spmm_strided_batched_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_1b
matrix_size:
- { M: 16, N: 16, K: 32 }
- { M: 16, N: 16, K: 64 }
- { M: 16, N: 16, K: 128 }
- { M: 16, N: 16, K: 256 }
- { M: 16, N: 16, K: 384 }
- { M: 16, N: 16, K: 512 }
- { M: 128, N: 128, K: 32 }
- { M: 128, N: 128, K: 64 }
- { M: 128, N: 128, K: 128 }
- { M: 128, N: 128, K: 256 }
- { M: 128, N: 128, K: 384 }
- { M: 128, N: 128, K: 512 }
alpha_beta: *alpha_beta_range
sparse_b: [ true, false]
batch_count: [1, 3]
alpha_vector_scaling: [true, false]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]

- name: spmm_strided_batched_activation_smoke
category: smoke
transA_transB: *transA_transB_range
function:
spmm_strided_batched: *real_precisions_1b
matrix_size:
- { M: 16, N: 16, K: 256 }
- { M: 128, N: 128, K: 256 }
alpha: 1.0
beta: 0.0
sparse_b: [ true, false]
batch_count: [1, 3]
activation_type: clippedrelu
activation_arg1 : [-1.0, 0.0, 0.5]
activation_arg2 : [-1.0, 0.0, 0.5, 1.0, 3.0]
orderA: [R]
orderB: [R]
orderC: [R]
orderD: [R]
...
Loading

0 comments on commit 1eacd9c

Please sign in to comment.