Repository navigation
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
|
It sounds like there are several testing objectives for this PR. Would it be possible to separate these into separate PRs? |
malcolmroberts
left a comment
There was a problem hiding this comment.
This would probably be better split-up.
|
This pull request has been inactive for 25 days and will be marked as stale. If you would like to keep this PR open, please:
This PR will be automatically closed in 5 days if no further activity occurs. |
|
This pull request has been automatically closed due to inactivity (30 days with no updates). If you'd like to continue working on this, feel free to reopen the PR or create a new one. |
## Motivation Split from #11272. `data_layout` stride and offset arithmetic had no direct tests. ## Technical Details - `data_layout_test.cpp` - constructor validation, packed default strides, offsets, in-place real/complex layouts and axis ordering - `shared/ptrdiff.h` - adds the missing `#include <algorithm>` for `std::any_of`; it did not build without it once the test compiled `data_layout.cpp` ## Test Plan Built this branch alone on develop and ran every `rocfft-internal-test` case in its own process on MI210 (gfx90a), ROCm 7.1.0. ## Test Result 15/15 new tests pass, 19/19 total. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
…ch_name (#12664) ## Motivation Split from #11272. Reading a solution map with a missing field walks past the end of the buffer, and every shipped `.dat` file is missing `gcn_arch_name`. ## Technical Details - `data_descriptor.h` - `SeekField` bounds the field search and throws when the field is absent. A truncated or unterminated list now throws too. `OptionalFieldParser` handles fields that may be absent. - `function_map_key.h` - `gcn_arch_name` is optional. New files still write it and still round trip. - `solution_map_test.cpp` - shipped maps load, write then read, and missing, empty or truncated files error out. - `library/src/CMakeLists.txt` - moves the `ROCFFT_SOLUTION_MAP_DIR` default above `add_subdirectory( tests )` so the tests find the shipped maps. ## Test Plan Built this branch alone on develop and ran every `rocfft-internal-test` case in its own process on MI210 (gfx90a), ROCm 7.1.0. ## Test Result 5/5 new tests pass, 9/9 total. Without the fix, `shipped_solution_maps_are_readable` and `solution_map_truncated_file` segfault. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
Motivation
Added more tests to the internal test suite for the solution map reader, the kernel cache, kernel names, stride arithmetic, or planning.
Technical Details
Adds 48 tests:
data_layout_test.cpp- stride and offset arithmeticfunction_map_key_test.cpp- kernel identifiers are unique and stablekernel_name_test.cpp- kernel names are unique and round tripsolution_map_test.cpp- tuning files read and write, bad files error outrtc_test.cpp- kernel cache store, get and serializeplan_test.cpp- decomposition, scheme choice, Bluestein selection, transpose fusion, buffer assignmentrepo_test.cpp- twiddle and chirp tables are reused, not rebuiltThe planning code was not in the test binary.
tests/CMakeLists.txtnow builds those sources into it and linkship::device.powX.cppstays out because it carries device code, sorocfft_stub.cppsupplies its three functions behindROCFFT_BUILD_INTERNAL_TEST. The shipping library is unchanged.library/src/CMakeLists.txtmoves theROCFFT_SOLUTION_MAP_DIRdefault abovertc_test.cpp- kernel cache store, get and serializeplan_test.cpp- decomposition, scheme choice, Bluestein selection, transpose fusion, buffer assignmentrepo_test.cpp- twiddle and chirp tables are reused, not rebuiltThe planning code was not in the test binary.
tests/CMakeLists.txtnow builds those sources into it and linkship::device.powX.cppstays out because it carries device code, sorocfft_stub.cppsupplies its three functions behindROCFFT_BUILD_INTERNAL_TEST. The shipping library is unchanged.library/src/CMakeLists.txtmoves theROCFFT_SOLUTION_MAP_DIRdefault aboveadd_subdirectory( tests )so the tests can find the shipped solution maps.Three tests failed against existing code, so the fixes are included:
data_descriptor.h- the field search had no end check and read past the end of the data when a field was missing.SeekFieldbounds it and throws.OptionalFieldParserhandles fields that may be absent.function_map_key.h-gcn_arch_nameis optional now, since the shipped.datfiles predate it. New files still include it and still round trip.rtc_cache.cpp-CREATE TABLEinconnect_dbgets the same try and catchget_stmtandstore_stmtalready use, so a corrupt cache file is skipped instead of failingrocfft_setup.Test Plan
Built and ran
rocfft-internal-teston MI300X, gfx942, ROCm 7.2.4.Test Result
48/48 new tests build and pass.
The library and all four stub consumers build and link clean.
Submission Checklist