-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Offload] Add CMake cache to be used in AMDGPU bot #119369
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
Conversation
@llvm/pr-subscribers-offload @llvm/pr-subscribers-backend-amdgpu Author: Jan Patrick Lehr (jplehr) ChangesAdds initial CMake cache definition that is similar to what we use in one of our production buidlbots. The goal is to consolidate the configurations and make them accessible. Full diff: https://github.com/llvm/llvm-project/pull/119369.diff 1 Files Affected:
diff --git a/offload/cmake/caches/AMDGPUBot.cmake b/offload/cmake/caches/AMDGPUBot.cmake
new file mode 100644
index 00000000000000..49a30dc6321f05
--- /dev/null
+++ b/offload/cmake/caches/AMDGPUBot.cmake
@@ -0,0 +1,14 @@
+set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload" CACHE STRING "")
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
+set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+set(LLVM_LIT_ARGS "-vv --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "")
+# set(LLVM_RUNTIME_TARGETS default;amdgcn-amd-amdhsa CACHE STRING "")
+set(LLVM_TARGETS_TO_BUILD X86;AMDGPU CACHE STRING "")
+
+set(CLANG_DEFAULT_LINKER "lld" CACHE STRING "")
+
+set(CMAKE_INSTALL_PREFIX /tmp/llvm.install.jpbot CACHE STRING "")
+set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+set(CMAKE_C_COMPILER_LAUNCHER ccache CACHE STRING "")
+set(CMAKE_CXX_COMPILER_LAUNCHER ccache CACHE STRING "")
|
offload/cmake/caches/AMDGPUBot.cmake
Outdated
set(LLVM_ENABLE_RUNTIMES "compiler-rt;openmp;offload" CACHE STRING "") | ||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") | ||
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(LLVM_LIT_ARGS "-vv --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "") |
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.
set(LLVM_LIT_ARGS "-vv --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "") | |
set(LLVM_LIT_ARGS "-v --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "") |
-vv
is documented as a "Deprecated alias for -v".
offload/cmake/caches/AMDGPUBot.cmake
Outdated
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(LLVM_LIT_ARGS "-vv --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "") | ||
# set(LLVM_RUNTIME_TARGETS default;amdgcn-amd-amdhsa CACHE STRING "") | ||
set(LLVM_TARGETS_TO_BUILD X86;AMDGPU CACHE STRING "") |
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.
Looks weird with no quotes around X86;AMDGPU
. Does CMake not require them?
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.
AFAIK quotes are only necessary on the command line because bash interprets ;
as an end of line.
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.
That's my understanding too. However, I used quotes for a lot of things, so I can also add them there to have this less surprising.
offload/cmake/caches/AMDGPUBot.cmake
Outdated
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") | ||
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(LLVM_LIT_ARGS "-vv --show-unsupported --timeout 100 --show-xfail -j 64" CACHE STRING "") | ||
# set(LLVM_RUNTIME_TARGETS default;amdgcn-amd-amdhsa CACHE STRING "") |
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.
Why include commented out stuff?
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.
Guess we don't want the AMDGPU libc/libc++ stuff on the bot?
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.
Not on this bot. And it appears to break something.
92d27bb
to
9dabdc1
Compare
offload/cmake/caches/AMDGPUBot.cmake
Outdated
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") | ||
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(LLVM_LIT_ARGS "-v --show-unsupported --timeout 100 --show-xfail -j 32" CACHE STRING "") | ||
set(LLVM_TARGETS_TO_BUILD "X86;AMDGPU" CACHE STRING "") |
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.
even though we don't support ARM yet, it still might be better to be a little bit future proof by using host
.
offload/cmake/caches/AMDGPUBot.cmake
Outdated
|
||
set(CLANG_DEFAULT_LINKER "lld" CACHE STRING "") | ||
|
||
set(CMAKE_INSTALL_PREFIX /tmp/llvm.install.jpbot CACHE STRING "") |
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.
If this file is purely for testing, I'd add the document to the beginning of this file; otherwise it doesn't make sense to me to force this.
set(CMAKE_INSTALL_PREFIX /tmp/llvm.install.jpbot CACHE STRING "") | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "") | ||
set(CMAKE_C_COMPILER_LAUNCHER ccache CACHE STRING "") | ||
set(CMAKE_CXX_COMPILER_LAUNCHER ccache CACHE STRING "") |
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.
Can you add a brief doc string as well?
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.
Sorry, not sure what to document here other than state "kind of obvious" things.
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.
Yeah, that's a fair point. I wish CMake could make it an optional argument. ""
really doesn't look nice. Up to you then,
Adds initial CMake cache definition that is similar to what we use in one of our production buidlbots. The goal is to consolidate the configurations and make them accessible. This cache file is a first step and to prepare for full pipeline testing once the new bot comes online.
9dabdc1
to
7d82a6d
Compare
Adds initial CMake cache definition that is similar to what we use in one of our production buidlbots. The goal is to consolidate the configurations and make them accessible.
This cache file is a first step and to prepare for full pipeline testing once the new bot comes online.