Skip to content

Conversation

@adityas-amd
Copy link
Member

Improves the AMD backend's path_to_rocm_lld() function to automatically detect the ROCm HIP linker (ld.lld) in more installation scenarios, particularly for ROCm SDK installations where rocm-sdk command is available.

Currently, Triton fails to locate ld.lld unless the TRITON_HIP_LLD_PATH environment variable is explicitly set, even when ROCm is correctly installed and available in the system PATH. This affects users with non-standard ROCm installation paths, particularly those using rocm-sdk.

Related issue: ROCm/TheRock#2006

Changes

Added ROCM_PATH environment variable support: Check ROCM_PATH/llvm/bin/ld.lld if the variable is set
Added rocm-sdk command detection: Run rocm-sdk path --root to discover SDK-based ROCm installations

Testing

Tested on ROCm 7.10.0 with ROCm SDK installation where ld.lld is located at $(rocm-sdk path --root)/llvm/bin/ld.lld. The fix successfully detects the linker without requiring manual TRITON_HIP_LLD_PATH export.


Checklist:

  • I am not making a trivial change, such as fixing a typo in a comment.
  • I have written a PR description following these rules.
  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

Testing:

  • This PR does not need a test because it improves runtime path detection logic that depends on the system environment and ROCm installation, which cannot be reliably mocked in unit tests. The fix was manually tested on ROCm 7.10.0

Lit tests:

  • I have not added any lit tests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant