[release/2.12] Disable CK GEMM/SDPA when gfx1250 is the only arch#3458
[release/2.12] Disable CK GEMM/SDPA when gfx1250 is the only arch#3458ethanwee1 wants to merge 2 commits into
Conversation
|
Jenkins build for 0382a55233af415242de97c69644905524ea6536 commit finished as ABORTED |
| if(USE_ROCM AND "gfx1250" IN_LIST PYTORCH_ROCM_ARCH) | ||
| set(_ck_supported_archs ${PYTORCH_ROCM_ARCH}) | ||
| list(REMOVE_ITEM _ck_supported_archs gfx1250) | ||
| if("${_ck_supported_archs}" STREQUAL "") | ||
| message(WARNING "gfx1250 is the only arch in PYTORCH_ROCM_ARCH: disabling USE_ROCM_CK_GEMM and USE_ROCM_CK_SDPA (composable_kernel lacks gfx1250 support)") | ||
| caffe2_update_option(USE_ROCM_CK_GEMM OFF) | ||
| caffe2_update_option(USE_ROCM_CK_SDPA OFF) | ||
| endif() | ||
| endif() |
There was a problem hiding this comment.
| if(USE_ROCM AND "gfx1250" IN_LIST PYTORCH_ROCM_ARCH) | |
| set(_ck_supported_archs ${PYTORCH_ROCM_ARCH}) | |
| list(REMOVE_ITEM _ck_supported_archs gfx1250) | |
| if("${_ck_supported_archs}" STREQUAL "") | |
| message(WARNING "gfx1250 is the only arch in PYTORCH_ROCM_ARCH: disabling USE_ROCM_CK_GEMM and USE_ROCM_CK_SDPA (composable_kernel lacks gfx1250 support)") | |
| caffe2_update_option(USE_ROCM_CK_GEMM OFF) | |
| caffe2_update_option(USE_ROCM_CK_SDPA OFF) | |
| endif() | |
| endif() | |
| if(USE_ROCM AND "${PYTORCH_ROCM_ARCH}" STREQUAL "gfx1250") | |
| message(WARNING "gfx1250 is the only arch in PYTORCH_ROCM_ARCH: disabling USE_ROCM_CK_GEMM and USE_ROCM_CK_SDPA (composable_kernel lacks gfx1250 support)") | |
| caffe2_update_option(USE_ROCM_CK_GEMM OFF) | |
| caffe2_update_option(USE_ROCM_CK_SDPA OFF) | |
| endif() |
There was a problem hiding this comment.
@ethanwee1 Apart from the simplification above, I'd suggest we have this logic reside next to https://github.com/ROCm/pytorch/pull/3458/changes#diff-ce80f3115ab2f6be5142f0678a1fc92c6b2d7727766ce44f48726c99e720f777R713, where we already have the arch filtering logic for gfx1250. That should update the option to OFF and skip all the subsequent code to add CK GEMM sources if gfx1250 is the only target.
The USE_ROCM_CK_SDPA logic is already set up to update the option to OFF if no supported arch is in PYTORCH_ROCM_ARCH.
If PYTORCH_ROCM_ARCH is gfx1250-only, composable_kernel has no supported arch for ck_gemm and CMake fails with empty HIP_ARCHITECTURES. Disable USE_ROCM_CK_GEMM next to the existing gfx1250 ck_gemm filtering logic. Per review on ROCm#3458.
Move the gfx1250-only guard next to the existing ck_gemm arch filtering and simplify to a single-arch check. Per review by @jithunnair-amd.
|
Addressed review feedback from @jithunnair-amd:
Same change applied to upstream companion pytorch#190683 |
0382a55 to
3731b21
Compare
|
Jenkins build for e7167bb379238dbf63400713cc2034a6e92c778c commit finished as NOT_BUILT |
Disabling USE_ROCM_CK_GEMM in aten/src/ATen/CMakeLists.txt excluded the CK GEMM source files but still left -DUSE_ROCM_CK_GEMM defined (it is emitted earlier in cmake/Dependencies.cmake). The call sites in CUDABlas.cpp and GroupedBlas.cpp are guarded by USE_ROCM_CK_GEMM, so they were still compiled and linked against gemm_internal_ck/bgemm_internal_ck/group_gemm_ck, producing undefined references at link time for gfx1250-only builds. Move the gfx1250-only disable into cmake/Dependencies.cmake, before the -DUSE_ROCM_CK_GEMM flag is added, so the sources and their call sites are compiled out consistently.
|
Jenkins build for e7167bb379238dbf63400713cc2034a6e92c778c commit finished as ABORTED |
…6735) JIRA ID : AIPYTORCH-804 ## Summary Enable `gfx125X-dcgpu` (gfx1250) in TheRock's PyTorch release matrix for **`release/2.12`** and **`nightly`**, matching the existing `release/2.11` behavior. Previously, `configure_pytorch_release_matrix.py` filtered gfx1250 out of those refs even though PyTorch now supports the arch: - `release/2.12`: ROCm/pytorch#3421 - `nightly`: upstream pytorch/pytorch#188597 (via TheRock's upstream nightly checkout) ## Changes - Remove `gfx125X-dcgpu` from the unsupported-family filter for `release/2.12` and `nightly` in `configure_pytorch_release_matrix.py`. ## Validation Both the single-arch and multi-arch gfx1250 PyTorch wheel builds are green with this matrix change (Python 3.12, ROCm `7.15.0a20260712`, index `rocm.nightlies.amd.com/whl-multi-arch`, `test_amdgpu_families=none`): | Scenario | `amdgpu_families` | Run | Result | |----------|-------------------|-----|--------| | Single-arch (gfx1250 only) | `gfx125X-dcgpu` | https://github.com/ROCm/TheRock/actions/runs/29936052631 | ✅ success | | Multi-arch (gfx942 + gfx1250) | `gfx94X-dcgpu;gfx125X-dcgpu` | https://github.com/ROCm/TheRock/actions/runs/29938470834 | ✅ success | Notes: - The **multi-arch** build (TheRock's production release/nightly path) works on stock `release/2.12` and `main` because `ck_gemm` is built as a separate library with gfx1250 filtered out of `HIP_ARCHITECTURES`; gfx1250 falls back to hipBLASLt at runtime, and CK GEMM stays enabled for gfx942/gfx950. - The **single-arch** gfx1250-only case additionally requires the CK-GEMM CMake fix in ROCm/pytorch#3458 (`release/2.12`) and pytorch/pytorch#190683 (`main`/nightly). These are not required for the multi-arch production builds.
No description provided.