Skip to content

[DFT][rocFFT] Add regression tests for stride validation and rank handling - #783

Open
zjin-lcf wants to merge 1 commit into
uxlfoundation:developfrom
zjin-lcf:test/rocfft-stride-validation-771
Open

zjin-lcf wants to merge 1 commit into
uxlfoundation:developfrom
zjin-lcf:test/rocfft-stride-validation-771

Conversation

@zjin-lcf

Copy link
Copy Markdown
Contributor

Summary

  • move rocFFT stride validation out of commit.cpp into src/dft/backends/rocfft/stride_validation.hpp, a standard-library-only helper with no behavior change, so it can be tested without rocFFT or an AMD GPU
  • add hardware-independent tests for the [DFT][rocFFT] Fix out-of-bounds stride handling #760 fixes: real forward strides that only fit the backward domain are rejected, INPUT/OUTPUT strides are validated per direction, and overlap caused by a non-unit innermost stride is rejected
  • add rocFFT backend commit tests (gated on ONEMATH_ENABLE_ROCFFT_BACKEND, skipped without an AMD GPU) that assert the commit result directly, including a rank-4 descriptor throwing oneapi::math::unimplemented

Fixes #771

Test plan

  • New tests on AMD Instinct MI100: 9 passed in both test_main_dft_ct and test_main_dft_rt
  • In a cuFFT-only build (no rocFFT), the 5 hardware-independent tests compile and pass
  • Reverting each [DFT][rocFFT] Fix out-of-bounds stride handling #760 fix makes the new tests fail:
    • innermost stride multiplier: both RejectsOverlapFromNonUnitInnermostStride tests fail
    • forward/backward direction validity: RejectsRealFwdStridesThatOnlyFitBackwardDomain (both) and RealIoStridesValidOnlyForForward fail
    • rank guard: RocfftCommit.RejectsRank4AsUnimplemented fails
  • Full rocFFT DFT suite on MI100 gives identical results with and without this change
  • Run the pre-commit clang-format hook

…dling

Move the rocFFT stride validation into a standard-library-only helper so it
can be tested without rocFFT or an AMD GPU, and add tests for the fixes in
uxlfoundation#760: false-accepted real strides, non-unit innermost strides, and rank-4
descriptors throwing unimplemented.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zjin-lcf
zjin-lcf requested a review from a team as a code owner September 30, 2026 13:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DFT][rocFFT] Add regression tests for stride validation and rank handling

1 participant