-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[amdgpu] LLVM 20 updates for AMD MI3xx GPUs #8793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e4a5be3
e932646
8a9ca3b
6e4fb08
efe237e
c3d7b84
eeb3354
bb8a9b3
c137b06
b74c00c
6b0f58b
f791165
1a6520a
86b6184
9260d4e
712d405
46444ee
5eed1b4
0f2615c
c189397
23478fd
c5edfdb
2d4703f
d2c87f6
ad65ec9
1be07f3
de14f98
c984b3c
f5118a7
78d9213
d20c823
f0ca790
26ae12c
514446e
2a6adb0
5516360
48cc4f7
76c25df
ed925e6
a78aaca
2549e39
300196b
8dab171
ed1c61d
29c4129
7b155bb
104dc18
13a0550
39cc7fe
36c0aa5
7c446fb
f47d1b8
440fcc2
b9c05cd
79f75c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| # -*- coding: utf-8 -*- | ||
|
|
||
| # -- stdlib -- | ||
|
|
@@ -19,18 +20,25 @@ def setup_llvm() -> None: | |
| Download and install LLVM. | ||
| """ | ||
| u = platform.uname() | ||
| if u.system == "Linux": | ||
| if (u.system, u.machine) == ("Linux", "x86_64"): | ||
| if cmake_args.get_effective("TI_WITH_AMDGPU"): | ||
| out = get_cache_home() / "llvm15-amdgpu-005" | ||
| url = "https://github.com/GaleSeLee/assets/releases/download/v0.0.5/taichi-llvm-15.0.0-linux.zip" | ||
| # We should use LLVM toolchains shipped with OS. | ||
| os.environ["LLVM_DIR"] = os.environ["LLVM_PATH"]+"/lib/cmake" | ||
| os.environ["CPATH"] = os.environ["ROCM_PATH"]+"/include" | ||
| elif is_manylinux2014(): | ||
| # FIXME: prebuilt llvm15 on ubuntu didn't work on manylinux2014 image of centos. Once that's fixed, remove this hack. | ||
| out = get_cache_home() / "llvm15-manylinux2014" | ||
| url = "https://github.com/ailzhang/torchhub_example/releases/download/0.3/taichi-llvm-15-linux.zip" | ||
| download_dep(url, out, strip=1) | ||
| else: | ||
| out = get_cache_home() / "llvm15" | ||
| url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip" | ||
| download_dep(url, out, strip=1) | ||
| download_dep(url, out, strip=1) | ||
|
|
||
| elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")): | ||
| out = get_cache_home() / "llvm15-manylinux2014" | ||
| # FIXME: ARM LLVM! | ||
| pass | ||
| elif (u.system, u.machine) == ("Darwin", "arm64"): | ||
| out = get_cache_home() / "llvm15-m1-nozstd" | ||
| url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-m1-nozstd.zip" | ||
|
|
@@ -47,5 +55,8 @@ def setup_llvm() -> None: | |
| raise RuntimeError(f"Unsupported platform: {u.system} {u.machine}") | ||
|
|
||
| # We should use LLVM toolchains shipped with OS. | ||
| # path_prepend('PATH', out / 'bin') | ||
| os.environ["LLVM_DIR"] = str(out) | ||
| #path_prepend('PATH', out / 'bin') | ||
| if ((u.system, u.machine) not in (("Linux", "arm64"), ("Linux", "aarch64"))) and not (cmake_args.get_effective("TI_WITH_AMDGPU")): | ||
| os.environ["LLVM_DIR"] = "/usr/lib/llvm-20/cmake" | ||
| os.environ["CUDA_HOME"] = "/usr/local/cuda" | ||
| os.environ["CPATH"] = "/usr/local/cuda/include" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LLVM_DIR hardcoded to Linux path for all platformsMedium Severity The final Reviewed by Cursor Bugbot for commit f47d1b8. Configure here. |
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMDGPU LLVM setup needs env
Medium Severity
On Linux x86_64 with
TI_WITH_AMDGPU,setup_llvmsetsLLVM_DIRandCPATHfromLLVM_PATHandROCM_PATHwithout checking they exist, so a missing variable raisesKeyErrorand aborts the build.Reviewed by Cursor Bugbot for commit b9c05cd. Configure here.