Repository navigation
Conversation
|
This appears to be a diff that was exported from phabricator, but the PR author does not have sufficient permissions to run CI. @geng-meta, please do step 2 of internal wiki to get write access so you do not need to get CI approvals in the future. If you think this is a mistake, please contact the Pytorch Dev Infra team. |
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - OUTDATED (earlier commit) - Ready for human review:
Findings (3): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/203715
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 14241fa with merge base 3796b39 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@geng-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D130060358. |
|
@jeffdaily : would you please help as I saw you review the same file changes recently. Thanks! |
…rch#203715) Summary: Fix HIP compilation of `ck_tile_group_gemm.hip` in builds that compile this source for unsupported targets such as `gfx1250`, instead of filtering CK GEMM architectures. Runtime checks cannot prevent CDNA-only assembly from being instantiated during compilation. Keep the original `GroupedGemmKernel` type for host compilation and supported `gfx942`, `gfx950`, and `gfx9-4-generic` device targets. Use a trap stub only for unsupported device targets. This preserves supported-target code generation and the kernel names used by profiler-based ROCm tests. Test Plan: - Full HIP translation unit compiled successfully for `gfx1250`. - `gfx942`/`gfx950`: all 62 BF16/FP16 configuration/layout cases produced assembly identical to the baseline, excluding source identifiers; symbol probes retained the exact baseline CK kernel names. - On-device MI300/MI350 tests have not been run. Differential Revision: D130060358
e44ea31 to
52e757c
Compare
There was a problem hiding this comment.
Automated review of 52e757c: nothing blocking; ready for human review.
This re-review finds that ck_tile::GroupedGemmKernel is again the Kernel type for host compilation and for gfx942/gfx950/gfx9-4-generic device compilation, with a trap stub for other device targets, and that the earlier blocking kernel-rename finding is fixed. Recommendation: Approve. The remaining points are all labeled non-blocking.
⚪ 3 non-blocking findings
Non-blocking: the trap stub can never run, and nothing says so. On device targets outside the #if, CkTileGroupGemm<...>::Kernel is a different type in the device pass (nested struct) than in the host pass (GroupedGemmKernel<...>). make_kernel<1>(Kernel{}, ...) puts Kernel in the mangled name, so the host-registered name does not exist in those code objects (incl. gfx90a in the default TORCH_CK_GEMM_ARCH_LIST, and gfx1250). A launch there would fail as a host-side launch error (likely invalid device function), not a device trap. No impact today since host dispatch only selects gfx950/gfx942, but the description's "trap stub for unsupported targets" is wrong. Fix: add a comment here explaining why the guard exists (CDNA-only asm fails elsewhere), that host dispatch makes the stub unreachable and host/device intentionally see different types, and which lists it must stay in sync with (host dispatch :677-683, CkTileGroupGemmConfigs specializations :163-262, GroupedBlas.cpp:805). Optional: for a real device trap, keep one type and put the #if inside the body (AsyncMM.hip:72-86, flash_attn/ck/launch_kernel_pt.hpp:17-36 with CUDA_KERNEL_ASSERT).
Non-blocking: the PR description still doesn't say which build fails, or that gfx90a changes. In OSS, native/hip/ck*.hip builds into ck_gemm filtered to TORCH_CK_GEMM_ARCH_LIST (aten/src/ATen/CMakeLists.txt:676-695, cmake/public/utils.cmake:305-316); with the default list gfx1250 and gfx9-4-generic never compile this file, so the failing build is presumably internal or uses an overridden list. The default-list OSS gfx90a code object now gets the stub instead of the full kernel harmless, but worth one line in the description.
Non-blocking: the profiler-name tests behind the earlier blocking finding have still not run on hardware. The description says MI300/MI350 tests haven't run, the PR has no ciflow label, and pull.yml's ROCm job only builds. Before landing, add ciflow/rocm-mi300 (gfx942) and ciflow/trunk (MI350/gfx950 job in trunk.yml:383-427) so test_grouped_gemm_ck_tile_config_coverage (test/test_linalg.py) and test_grouped_gemm_rocm_ck_flag[ck_tile] (test/test_matmul_cuda.py) run on both.
This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review
Withdrawn: the automated review of 52e757c found nothing blocking.
…rch#203715) Summary: Fix HIP compilation of `ck_tile_group_gemm.hip` in builds that compile this source for unsupported targets such as `gfx1250`, instead of filtering CK GEMM architectures. Runtime checks cannot prevent CDNA-only assembly from being instantiated during compilation. Keep the original `GroupedGemmKernel` type for host compilation and supported `gfx942`, `gfx950`, and `gfx9-4-generic` device targets. Use a trap stub only for unsupported device targets. This preserves supported-target code generation and the kernel names used by profiler-based ROCm tests. Test Plan: - Full HIP translation unit compiled successfully for `gfx1250`. - `gfx942`/`gfx950`: all 62 BF16/FP16 configuration/layout cases produced assembly identical to the baseline, excluding source identifiers; symbol probes retained the exact baseline CK kernel names. - On-device MI300/MI350 tests have not been run. Reviewed By: RandySheriff Differential Revision: D130060358
52e757c to
14241fa
Compare
|
|
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
|
Adding the |
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 |
Summary:
Fix HIP compilation of
ck_tile_group_gemm.hipin builds that compile thissource for unsupported targets such as
gfx1250, instead of filtering CKGEMM architectures. Runtime checks cannot prevent CDNA-only assembly from
being instantiated during compilation.
Keep the original
GroupedGemmKerneltype for host compilation and supportedgfx942,gfx950, andgfx9-4-genericdevice targets. Use a trap stub onlyfor unsupported device targets. This preserves supported-target code generation
and the kernel names used by profiler-based ROCm tests.
Test Plan:
gfx1250.gfx942/gfx950: all 62 BF16/FP16 configuration/layout cases produced assembly identical to the baseline, excluding source identifiers; symbol probes retained the exact baseline CK kernel names.Reviewed By: RandySheriff
Differential Revision: D130060358
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang