Repository navigation
SDPA support gfx950 - #155103
SDPA support gfx950#155103xw285cornell wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155103
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit 4162560 with merge base c881f2d ( NEW FAILURE - The following job has failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D75934358 |
40867db to
6eb6a98
Compare
|
This pull request was exported from Phabricator. Differential Revision: D75934358 |
6eb6a98 to
a7f4b91
Compare
|
@pytorchbot label "topic: not user facing" |
a7f4b91 to
89c60e9
Compare
Summary: Pull Request resolved: pytorch#155103 Seems to run, just not the optimal performance. e.g. ck_tile doesn't have those gfx942 optimizations it seems https://github.com/ROCm/composable_kernel/blob/develop/include/ck_tile/ops/fmha/block/variants.hpp#L27 Test Plan: ``` +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | Batch Size | Sequence Length | Heads | Head Dim | Flash Time (µs) | Mem Eff Time (µs) | Math Time (µs) | Flex Time (µs) | xformers Time (µs) | Flash TFlops | Mem Eff TFlops | Math TFlops | Flex TFlops | xformers TFlops | Speedup (Flash/Math) | Speedup (MemEff/Math) | Speedup (Flex/Math) | Speedup (xformers/Math) | xformers trace_url | Flash trace_url | +==============+===================+=========+============+===================+=====================+==================+==================+======================+================+==================+===============+===============+===================+========================+=========================+=======================+===========================+======================+===================+ | 1 | 4096 | 16 | 64 | 179.737 | 182.874 | 3106.6 | 359.662 | 205.506 | 382.334 | 375.776 | 22.1205 | 191.067 | 334.392 | 17.2841 | 16.9877 | 8.63754 | 15.1169 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 4096 | 32 | 128 | 617.271 | 623.38 | 7169.73 | 998.961 | 654.534 | 445.312 | 440.947 | 38.3387 | 275.164 | 419.96 | 11.6152 | 11.5014 | 7.17719 | 10.9539 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 16 | 64 | 667.032 | 670.118 | 13031.8 | 1383.42 | 768.452 | 412.091 | 410.193 | 21.0928 | 198.694 | 357.703 | 19.5371 | 19.4471 | 9.42 | 16.9586 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 32 | 128 | 2074.64 | 2214.81 | 29186.9 | 3916.35 | 2404.29 | 529.978 | 496.437 | 37.6714 | 280.749 | 457.313 | 14.0684 | 13.1781 | 7.45257 | 12.1395 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 16 | 64 | 2456.6 | 2472.38 | 51095.8 | 5647.01 | 3008.09 | 447.574 | 444.718 | 21.5186 | 194.707 | 365.518 | 20.7994 | 20.6666 | 9.0483 | 16.9861 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 32 | 128 | 8048.8 | 8070.96 | 113478 | 15580.8 | 9768.71 | 546.423 | 544.922 | 38.7569 | 282.274 | 450.218 | 14.0987 | 14.06 | 7.2832 | 11.6165 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | Batch Size | Sequence Length | Heads | Head Dim | Flash Time (µs) | Mem Eff Time (µs) | Math Time (µs) | Flex Time (µs) | xformers Time (µs) | Flash TFlops | Mem Eff TFlops | Math TFlops | Flex TFlops | xformers TFlops | Speedup (Flash/Math) | Speedup (MemEff/Math) | Speedup (Flex/Math) | Speedup (xformers/Math) | xformers trace_url | Flash trace_url | +==============+===================+=========+============+===================+=====================+==================+==================+======================+================+==================+===============+===============+===================+========================+=========================+=======================+===========================+======================+===================+ | 1 | 4096 | 16 | 64 | 692.323 | 697.649 | 4241.81 | 1562.26 | 906.441 | 248.148 | 246.254 | 40.5012 | 109.968 | 189.531 | 6.12693 | 6.08015 | 2.71518 | 4.67963 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 4096 | 32 | 128 | 2263.22 | 2267.38 | 9482.64 | 7003.8 | 2765.5 | 303.636 | 303.079 | 72.4687 | 98.1174 | 248.489 | 4.1899 | 4.18221 | 1.35393 | 3.42891 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 16 | 64 | 2553.94 | 2572.68 | 15909.8 | 5697.16 | 3284.77 | 269.073 | 267.112 | 43.193 | 120.621 | 209.206 | 6.22953 | 6.18415 | 2.79259 | 4.84352 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 32 | 128 | 8187.67 | 8201.71 | 35449.2 | 26424.3 | 10364.5 | 335.722 | 335.147 | 77.5413 | 104.025 | 265.21 | 4.32959 | 4.32218 | 1.34154 | 3.42025 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 16 | 64 | 9948.15 | 9815.47 | 62815.1 | 23741.9 | 12710 | 276.31 | 280.046 | 43.7598 | 115.778 | 216.269 | 6.31425 | 6.39961 | 2.64575 | 4.94217 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 32 | 128 | 32187.6 | 32035.6 | 137832 | 102075 | 40623.4 | 341.595 | 343.216 | 79.7716 | 107.716 | 270.66 | 4.28216 | 4.30248 | 1.35031 | 3.39293 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ ``` Rollback Plan: Reviewed By: nmacchioni, yoyoyocmu Differential Revision: D75934358
|
This pull request was exported from Phabricator. Differential Revision: D75934358 |
89c60e9 to
4162560
Compare
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m "looks like it broke mi300 tests, see https://hud.pytorch.org/hud/pytorch/pytorch/9a4c08ddfc9b43c07cd16355277d359dfcef50d6/1?per_page=50&name_filter=mi300&mergeEphemeralLF=true" -c nosignal |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit b9312c5. Reverted #155103 on behalf of https://github.com/malfet due to looks like it broke mi300 tests, see https://hud.pytorch.org/hud/pytorch/pytorch/9a4c08ddfc9b43c07cd16355277d359dfcef50d6/1?per_page=50&name_filter=mi300&mergeEphemeralLF=true ([comment](#155103 (comment)))
|
@xw285cornell your PR has been successfully reverted. |
malfet
left a comment
There was a problem hiding this comment.
Ok, revert did not help, let's reland
|
@pytorchbot merge -f "MI300 failures are unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: This PR has internal changes and must be landed via Phabricator! Please try reimporting/rexporting the PR! Details for Dev Infra teamRaised by workflow job |
Summary: Seems to run, just not the optimal performance. e.g. ck_tile doesn't have those gfx942 optimizations it seems https://github.com/ROCm/composable_kernel/blob/develop/include/ck_tile/ops/fmha/block/variants.hpp#L27 Test Plan: ``` +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | Batch Size | Sequence Length | Heads | Head Dim | Flash Time (µs) | Mem Eff Time (µs) | Math Time (µs) | Flex Time (µs) | xformers Time (µs) | Flash TFlops | Mem Eff TFlops | Math TFlops | Flex TFlops | xformers TFlops | Speedup (Flash/Math) | Speedup (MemEff/Math) | Speedup (Flex/Math) | Speedup (xformers/Math) | xformers trace_url | Flash trace_url | +==============+===================+=========+============+===================+=====================+==================+==================+======================+================+==================+===============+===============+===================+========================+=========================+=======================+===========================+======================+===================+ | 1 | 4096 | 16 | 64 | 179.737 | 182.874 | 3106.6 | 359.662 | 205.506 | 382.334 | 375.776 | 22.1205 | 191.067 | 334.392 | 17.2841 | 16.9877 | 8.63754 | 15.1169 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 4096 | 32 | 128 | 617.271 | 623.38 | 7169.73 | 998.961 | 654.534 | 445.312 | 440.947 | 38.3387 | 275.164 | 419.96 | 11.6152 | 11.5014 | 7.17719 | 10.9539 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 16 | 64 | 667.032 | 670.118 | 13031.8 | 1383.42 | 768.452 | 412.091 | 410.193 | 21.0928 | 198.694 | 357.703 | 19.5371 | 19.4471 | 9.42 | 16.9586 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 32 | 128 | 2074.64 | 2214.81 | 29186.9 | 3916.35 | 2404.29 | 529.978 | 496.437 | 37.6714 | 280.749 | 457.313 | 14.0684 | 13.1781 | 7.45257 | 12.1395 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 16 | 64 | 2456.6 | 2472.38 | 51095.8 | 5647.01 | 3008.09 | 447.574 | 444.718 | 21.5186 | 194.707 | 365.518 | 20.7994 | 20.6666 | 9.0483 | 16.9861 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 32 | 128 | 8048.8 | 8070.96 | 113478 | 15580.8 | 9768.71 | 546.423 | 544.922 | 38.7569 | 282.274 | 450.218 | 14.0987 | 14.06 | 7.2832 | 11.6165 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | Batch Size | Sequence Length | Heads | Head Dim | Flash Time (µs) | Mem Eff Time (µs) | Math Time (µs) | Flex Time (µs) | xformers Time (µs) | Flash TFlops | Mem Eff TFlops | Math TFlops | Flex TFlops | xformers TFlops | Speedup (Flash/Math) | Speedup (MemEff/Math) | Speedup (Flex/Math) | Speedup (xformers/Math) | xformers trace_url | Flash trace_url | +==============+===================+=========+============+===================+=====================+==================+==================+======================+================+==================+===============+===============+===================+========================+=========================+=======================+===========================+======================+===================+ | 1 | 4096 | 16 | 64 | 692.323 | 697.649 | 4241.81 | 1562.26 | 906.441 | 248.148 | 246.254 | 40.5012 | 109.968 | 189.531 | 6.12693 | 6.08015 | 2.71518 | 4.67963 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 4096 | 32 | 128 | 2263.22 | 2267.38 | 9482.64 | 7003.8 | 2765.5 | 303.636 | 303.079 | 72.4687 | 98.1174 | 248.489 | 4.1899 | 4.18221 | 1.35393 | 3.42891 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 16 | 64 | 2553.94 | 2572.68 | 15909.8 | 5697.16 | 3284.77 | 269.073 | 267.112 | 43.193 | 120.621 | 209.206 | 6.22953 | 6.18415 | 2.79259 | 4.84352 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 8192 | 32 | 128 | 8187.67 | 8201.71 | 35449.2 | 26424.3 | 10364.5 | 335.722 | 335.147 | 77.5413 | 104.025 | 265.21 | 4.32959 | 4.32218 | 1.34154 | 3.42025 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 16 | 64 | 9948.15 | 9815.47 | 62815.1 | 23741.9 | 12710 | 276.31 | 280.046 | 43.7598 | 115.778 | 216.269 | 6.31425 | 6.39961 | 2.64575 | 4.94217 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ | 1 | 16384 | 32 | 128 | 32187.6 | 32035.6 | 137832 | 102075 | 40623.4 | 341.595 | 343.216 | 79.7716 | 107.716 | 270.66 | 4.28216 | 4.30248 | 1.35031 | 3.39293 | | | +--------------+-------------------+---------+------------+-------------------+---------------------+------------------+------------------+----------------------+----------------+------------------+---------------+---------------+-------------------+------------------------+-------------------------+-----------------------+---------------------------+----------------------+-------------------+ ``` Rollback Plan: Differential Revision: D75934358 Pull Request resolved: pytorch#155103 Approved by: https://github.com/yoyoyocmu
This reverts commit b9312c5. Reverted pytorch#155103 on behalf of https://github.com/malfet due to looks like it broke mi300 tests, see https://hud.pytorch.org/hud/pytorch/pytorch/9a4c08ddfc9b43c07cd16355277d359dfcef50d6/1?per_page=50&name_filter=mi300&mergeEphemeralLF=true ([comment](pytorch#155103 (comment)))
|
@pytorchbot merge -f "see nikitas comment" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly.
The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly.
The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes pytorch#188113
The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR #144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR #155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR #187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes #188113 Pull Request resolved: #188114 Approved by: https://github.com/eellison, https://github.com/alugorey, https://github.com/jeffdaily Co-authored-by: doplxyz <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Jeff Daily <[email protected]>
…h#188114) The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes pytorch#188113 Pull Request resolved: pytorch#188114 Approved by: https://github.com/eellison, https://github.com/alugorey, https://github.com/jeffdaily Co-authored-by: doplxyz <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Jeff Daily <[email protected]>
The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR #144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR #155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR #187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes #188113 Pull Request resolved: #188114 Approved by: https://github.com/jeffdaily Co-authored-by: doplxyz <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Jeff Daily <[email protected]>
…h#188114) The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes pytorch#188113 Pull Request resolved: pytorch#188114 Approved by: https://github.com/eellison, https://github.com/alugorey, https://github.com/jeffdaily Co-authored-by: doplxyz <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Jeff Daily <[email protected]>
…h#188114) The CK Tile FMHA generator already compiles working kernels for gfx12 (--targets=gfx1201 passes through to the kernel template), but two guards prevented them from being used on RDNA4 hardware: 1. launch_kernel_pt.hpp: kentry_pt kernel entry stubs added in PR pytorch#144777 ([ROCm] CK SDPA - Move arch check to CK patch) had a hard-coded whitelist of gfx90a/gfx942/gfx950 (updated for gfx950 in PR pytorch#155103). gfx1200/gfx1201 were never added despite the CK Tile FMHA generator supporting them. 2. Context.cpp: ckSDPASupported() split from ckSupported() in PR pytorch#187267 ([ROCm] Split CK SDPA vs CK GEMM arch gating) only listed gfx942/gfx950. Added gfx1200/gfx1201. Tested on gfx1201 (RX 9070): WITHOUT patch the kernel ASSERTs, WITH patch the kernel executes correctly. Fixes pytorch#188113 Pull Request resolved: pytorch#188114 Approved by: https://github.com/jeffdaily Co-authored-by: doplxyz <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Jeff Daily <[email protected]>
Summary: Seems to run, just not the optimal performance. e.g. ck_tile doesn't have those gfx942 optimizations it seems https://github.com/ROCm/composable_kernel/blob/develop/include/ck_tile/ops/fmha/block/variants.hpp#L27
Test Plan:
Rollback Plan:
Differential Revision: D75934358