Repository navigation
[ROCm] [CK] Composable Kernel integration for inductor backend - #158747
iupaikov-amd wants to merge 54 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/158747
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 72 PendingAs of commit fdd5126 with merge base 789d494 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
36cb691 to
41deb6e
Compare
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
41deb6e to
784166a
Compare
This is currently the most-common installation path for Linux. Windows case has too many options, so just choosing /opt/rocm as a sensible default.
…integration_upstream2
|
@pytorchbot label "ciflow/rocm" "ciflow/rocm-mi300" |
|
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
|
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
…integration_upstream2
|
MI200 CI successfully ran MI300 CI successfully ran Latest MI200 failures are due to outage as per #161784, so we can ignore it. |
|
@pytorchbot merge -f "force merging on request from jithunnair-amd based on evidence of prior clean CI signals" |
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: Commit b7af5c9 was HEAD when comment 3254576258 was posted but now the latest commit on the PR is fdd5126. Please re-issue the merge command to merge the latest commit. Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "force merging on request from jithunnair-amd based on evidence of prior clean CI signals" |
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 |
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the Composable Kernel (CK) library as a proper PyTorch dependency for ROCm builds, moving away from the submodule-based approach to enable better version control and commit pinning similar to Triton.
- Adds CK as a dependency in setup.py for ROCm builds with commit pinning support
- Simplifies CK path detection by removing manual directory configuration requirements
- Updates test infrastructure to use the new CK import mechanism
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| torch/_inductor/utils.py | Simplifies CK directory validation by automatically setting config.rocm.ck_dir from imported package |
| torch/_inductor/codegen/rocm/compile_command.py | Updates CK path resolution to use try_import_ck_lib when config is not set |
| tools/setup_helpers/rocm_env.py | Adds utilities for CK dependency management including commit pin reading and PEP 508 URL generation |
| test/inductor/test_ck_backend.py | Refactors test setup to use try_import_ck_lib instead of manual package import |
| setup.py | Integrates CK dependency for ROCm Linux builds using the new dependency string helper |
| .ci/docker/ci_commit_pins/rocm-composable-kernel.txt | Pins CK to specific commit hash for reproducible builds |
Comments suppressed due to low confidence (1)
.ci/docker/ci_commit_pins/rocm-composable-kernel.txt:1
- [nitpick] The file contains an unnecessary trailing newline after the commit hash. Consider removing the empty line to keep the file clean and consistent with other commit pin files.
7fe50dc3da2069d6645d9deb8c017a876472a977
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
@pytorchbot revert -m "Broke linux-binary-manywheel-rocm / manywheel-py3_9-rocm6_4-test: https://hud.pytorch.org/hud/pytorch/pytorch/019fed39aa6b2dd8c69347378d53423e5efae8d4/1?per_page=50&name_filter=manywheel&mergeEphemeralLF=true" |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot revert -m "Broke linux-binary-manywheel-rocm / manywheel-py3_9-rocm6_4-test: https://hud.pytorch.org/hud/pytorch/pytorch/019fed39aa6b2dd8c69347378d53423e5efae8d4/1?per_page=50&name_filter=manywheel&mergeEphemeralLF=true ... PR didn't have this job run successfully due to CI outage" -c nosignal |
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@iupaikov-amd your PR has been successfully reverted. |
This is a part of our effort for integrating Composable Kernel library for Inductor backend. Currently we have a submodule, but would prefer to have commit pin control over the library as with Triton. We intentionally avoid putting all installation logic in CI scripts to allow locally built versions to have this functionality.
The idea is to have CK as a pytorch dependency in pytorch 2.9 release to allow people to use it with inductor and AOT inductor and then gradually step away from submodule usage. Right now CK usage in SDPA/Gemm is tied to submodule files.
This PR is a remake of due to branch error: #156192
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben