Repository navigation
test(rocsparse): add unit tests for 80% unit-only coverage (AISPARSE-879) #13475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
cead64f
test(rocsparse): add shared unit-test setup for the coverage work (AI…
kliegeois 25afb73
ci(rocsparse): report unit and integration coverage separately (AISPA…
kliegeois b0c22b4
test(rocsparse): add host-side unit tests (bfloat16, auxiliary branch…
kliegeois d68870c
test(rocsparse): add level-2 unit tests (SpMV, SpSV, BSR, iterative t…
kliegeois a485d8a
test(rocsparse): add conversion unit tests (prune, sort, descriptors,…
kliegeois 0a3cfec
test(rocsparse): add preconditioner unit tests (ILU0, IC0, itilu0, gt…
kliegeois a149a23
test(rocsparse): add unit tests for SpMM, SpGEMM, SpGEAM, SDDMM, SpSM…
kliegeois a4d3f29
test(rocsparse): tighten host unit-test checks after review (AISPARSE…
kliegeois b7f5150
test(rocsparse): tighten level2 unit-test checks after review (AISPAR…
kliegeois 6a19ee0
test(rocsparse): tighten conv unit-test checks after review (AISPARSE…
kliegeois 9ba253d
test(rocsparse): tighten precond unit-test checks after review (AISPA…
kliegeois 8674063
test(rocsparse): tighten extra unit-test checks after review (AISPARS…
kliegeois 5bbcc1d
test(rocsparse): leave library-bug cases to their fix PRs (AISPARSE-879)
kliegeois fad851f
test(rocsparse): cover remaining missed paths in unit tests (AISPARSE…
kliegeois fb2cf55
test(rocsparse): fail blocked ELL dense_to_sparse on unexpected statu…
kliegeois c10f8e1
test(rocsparse): correct itilu0 async_split reachability comments
kliegeois 2c49e3c
test(rocsparse): set the spildlt0 boost on the descriptor too
kliegeois 9a24562
test(rocsparse): match index buffers to i32 descriptors under ILP64 (…
kliegeois 703bb37
test(rocsparse): check unsupported SpMV cases that succeed (AISPARSE-…
kliegeois b4e2680
test(rocsparse): define the f16 and bf16 type traits once (AISPARSE-879)
kliegeois a9a2523
test(rocsparse): keep one SpMM buffer across the stages (AISPARSE-879)
kliegeois f097e93
test(rocsparse): solve several right-hand sides in the SpTRSM cases (…
kliegeois 2d64074
test(rocsparse): assert the SpTRSV zero pivot query result (AISPARSE-…
kliegeois 6824dad
test(rocsparse): run the plain transpose in the real SpSV sweeps (AIS…
kliegeois 8a603e9
test(rocsparse): store entries in the ignored triangle of SpSM, BSRSM…
kliegeois 083fad5
test(rocsparse): pre-fill conversion targets and C row pointers with …
kliegeois f23ae02
test(rocsparse): add negative entries to the prune and compress input…
kliegeois ae4e242
test(rocsparse): name the cause of the spildlt0 i32/i64 guard (AISPAR…
kliegeois d14a873
test(rocsparse): name the tickets at the workaround sites (AISPARSE-879)
kliegeois d269af6
test(rocsparse): assert the status the library returns instead of acc…
kliegeois c0a0a29
test(rocsparse): build the unit tests with the library configuration …
kliegeois 0fa38ed
test(rocsparse): report a failed coverage_split and clean the coverag…
kliegeois cb8152f
test(rocsparse): keep beta 0 real and use complex scalars in the BSR …
kliegeois be4a943
test(rocsparse): allocate the blas handle passed to blas_destroy_hand…
kliegeois a2918e0
test(rocsparse): accept the itilu0 stagnation exit in the stopping ru…
kliegeois 9fb9763
test(rocsparse): sequence the random draws of the test values (AISPAR…
kliegeois edab5f7
test(rocsparse): explain the SpTRSM tolerance (AISPARSE-879)
kliegeois 842314e
test(rocsparse): build and run the unit tests under rocsparse_ILP64 (…
kliegeois 0651d73
Merge branch 'develop' into task/unit-cov-fused
kliegeois cb6903d
ci(rocsparse): move the rocSPARSE-unit and rocSPARSE-integration flag…
kliegeois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
projects/rocsparse/clients/unittests/cmake/unit_tests_conv.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # ######################################################################## | ||
| # Copyright (C) 2026 Advanced Micro Devices, Inc. All rights Reserved. | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in | ||
| # all copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| # THE SOFTWARE. | ||
| # | ||
| # ######################################################################## | ||
|
|
||
| # Unit tests for the conv area (conversion, pruning, sorting, sparse-matrix descriptors). | ||
| # Included from clients/unittests/CMakeLists.txt. | ||
|
|
||
| list(APPEND ROCSPARSE_UNIT_TEST_DEVICE_SOURCES | ||
| unit_test_device_conv_internal.cpp | ||
| unit_test_device_conv_extract.cpp | ||
| unit_test_device_conv_sort.cpp | ||
| unit_test_device_conv_spmat.cpp | ||
| unit_test_device_conv_prune.cpp | ||
| unit_test_device_conv_gebsr.cpp | ||
| unit_test_device_conv_descr.cpp | ||
| unit_test_device_conv_hyb.cpp | ||
| unit_test_device_conv_edges.cpp | ||
| unit_test_device_conv_check.cpp | ||
| unit_test_device_conv_dense.cpp | ||
| ) |
49 changes: 49 additions & 0 deletions
49
projects/rocsparse/clients/unittests/cmake/unit_tests_extra.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # ######################################################################## | ||
| # Copyright (C) 2026 Advanced Micro Devices, Inc. All rights Reserved. | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in | ||
| # all copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| # THE SOFTWARE. | ||
| # | ||
| # ######################################################################## | ||
|
|
||
| # Unit tests for the extra area (SpMM, SpGEMM, SpGEAM, SDDMM, SpSM, SpTRSM, | ||
| # bsrsm, BELL, gebsrmm, gemmi, spmat_scale). | ||
| # Included from clients/unittests/CMakeLists.txt. | ||
|
|
||
| list(APPEND ROCSPARSE_UNIT_TEST_DEVICE_SOURCES | ||
| unit_test_internal_level3_sddmm_branches.cpp | ||
| unit_test_device_extra_bell.cpp | ||
| unit_test_device_extra_bsrgeam.cpp | ||
| unit_test_device_extra_bsrsm.cpp | ||
| unit_test_device_extra_csrgemm_bsrgemm.cpp | ||
| unit_test_device_extra_geam.cpp | ||
| unit_test_device_extra_gebsrmm.cpp | ||
| unit_test_device_extra_gemm_geam.cpp | ||
| unit_test_device_extra_gemmi.cpp | ||
| unit_test_device_extra_sddmm.cpp | ||
| unit_test_device_extra_spgeam.cpp | ||
| unit_test_device_extra_spgemm.cpp | ||
| unit_test_device_extra_spmm.cpp | ||
| unit_test_device_extra_spsm.cpp | ||
| ) | ||
| if(ROCSPARSE_ENABLE_SPMAT_SCALE) | ||
| list(APPEND ROCSPARSE_UNIT_TEST_DEVICE_SOURCES unit_test_device_extra_spmat_scale.cpp) | ||
| endif() | ||
| if(BUILD_WITH_TRSM_REFACTORING) | ||
| list(APPEND ROCSPARSE_UNIT_TEST_DEVICE_SOURCES unit_test_device_extra_sptrsm.cpp) | ||
| endif() |
42 changes: 42 additions & 0 deletions
42
projects/rocsparse/clients/unittests/cmake/unit_tests_host.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # ######################################################################## | ||
| # Copyright (C) 2026 Advanced Micro Devices, Inc. All rights Reserved. | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in | ||
| # all copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| # THE SOFTWARE. | ||
| # | ||
| # ######################################################################## | ||
|
|
||
| # Unit tests for the host area (bfloat16, BLAS wrappers, auxiliary and | ||
| # library-internal host branches). | ||
| # Included from clients/unittests/CMakeLists.txt. | ||
|
|
||
| # rocsparse_bfloat16.h only defines the full rocsparse_bfloat16 struct when | ||
| # compiled as HIP. Build this TU as HIP host code only: no device code object, | ||
| # so the binary stays GPU-independent. | ||
| target_sources(rocsparse-unit-test PRIVATE | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/unit_test_bfloat16.cpp | ||
| ) | ||
| set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/unit_test_bfloat16.cpp PROPERTIES | ||
| COMPILE_OPTIONS "-x;hip;--offload-host-only" | ||
| ) | ||
|
|
||
| list(APPEND ROCSPARSE_UNIT_TEST_DEVICE_SOURCES | ||
| unit_test_internal_common_blas.cpp | ||
| unit_test_host_auxiliary_branches.cpp | ||
| unit_test_host_internal_branches.cpp | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.