Skip to content

feat(rocfft): add support for complex-to-real 3D FFTs with partial-pass - #8687

Merged
eng-flavio-teixeira merged 251 commits into
ROCm:developfrom
eng-flavio-teixeira:c2r_partial_pass
Oct 9, 2026
Merged

eng-flavio-teixeira merged 251 commits into
ROCm:developfrom
eng-flavio-teixeira:c2r_partial_pass

Conversation

@eng-flavio-teixeira

@eng-flavio-teixeira eng-flavio-teixeira commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Adds support for c2r partial-pass 3D transforms.

JIRA ID : AIFFT-512

Technical Details

The major change here deals with the ordering of the partial-pass kernels. c2c and r2c do (SBRR + partial-pass steps 1+2) as the first kernel and (partial pass steps 3+4 + SBCC) as the second kernel in a 3D-transform. In c2r this order is reversed because the even-length real to complex pre-process step must happen as the last step before the full transform in the Hermitian dimension. The ordering in c2r becomes (SBCC + partial-pass steps 1+2) as the first kernel and (partial-pass steps 3+4 + SBRR) as the second kernel. This order reversal also does exist in the even-length non-partial pass kernels (SBRR as the first kernel in c2c and r2c and SBCC as the first kernel in c2r).

Because of this new ordering, the fused partial-pass steps 1+2 and steps 3-4 need to work interchangeably. However, the partial-pass SBCC interleaves the off-dimension in the LDS column for improved HBM data access patterns. So the main change here is to make sure that steps 1+2 and steps 3+4 work for both the non-interleaved and interleaved cases.

Aside from the re-ordering work, the off-dimension pass in the SBCC (for the c2c and r2c cases) now also supports multiple factors. I'm adding this change here since there was already a significant re-write of stockham_pp_gen.h.

For now the length 216x104x100 has been enabled in config_pp_3d.py for c2r. Once this PR lands, I will also add more lengths from the molecular dynamic suite to config_pp_3d.py.

Test Plan

The current partial-pass suite tests already cover forward and inverse directions for both real and complex transforms.

Test Result

All tests should pass without issues.

Submission Checklist

 - Fixes for the r2c case:
    + Fix issue with calculate_offsets .
    + Fix issue with local_transpose_pp_length.
    + Fix issue in treenode assignment.
    + Fix issue with apply twiddle partial pass generator.
@eng-flavio-teixeira eng-flavio-teixeira changed the title Add support for complex-to-real 3D FFTs with partial-pass feat(rocfft): add support for complex-to-real 3D FFTs with partial-pass Sep 30, 2026
@eng-flavio-teixeira
eng-flavio-teixeira marked this pull request as ready for review October 1, 2026 22:49
@eng-flavio-teixeira
eng-flavio-teixeira requested review from a team as code owners October 1, 2026 22:49
@ROCm ROCm deleted a comment from github-actions Bot Oct 5, 2026
@ROCm ROCm deleted a comment from github-actions Bot Oct 5, 2026
Comment thread projects/rocfft/CHANGELOG.md Resolved
@regan-amd
regan-amd self-requested a review October 7, 2026 16:26

@regan-amd regan-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ FYI: some copyright years need updating.

@regan-amd regan-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very minor comment-accuracy suggestion; lgtm otherwise.

@eng-flavio-teixeira
eng-flavio-teixeira merged commit d88d8b6 into ROCm:develop Oct 9, 2026
93 of 95 checks passed
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants