Skip to content

Commit 0223984

Browse files
committed
[libc] Expose the AMDGPU code object version
Summary: People might want to modify this to run on older machines. Expose this so it can be set with `-DRUNTIMES_amdgcn-amd-amdhsa_LIBC_GPU_CODE_OBJECT_VERSION`.
1 parent 0c13988 commit 0223984

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

libc/cmake/modules/prepare_libc_gpu_build.cmake

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,10 @@ if(NOT TARGET libc.utils.gpu.loader AND gpu_loader_executable)
100100
)
101101
endif()
102102

103-
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
104-
# The AMDGPU environment uses different code objects to encode the ABI for
105-
# kernel calls and intrinsic functions. We want to specify this manually to
106-
# conform to whatever the test suite was built to handle.
107-
set(LIBC_GPU_CODE_OBJECT_VERSION 6)
108-
endif()
103+
# The AMDGPU environment uses different code objects to encode the ABI for
104+
# kernel calls and intrinsic functions. We want to expose this to conform to
105+
# whatever the test suite was built to handle.
106+
set(LIBC_GPU_CODE_OBJECT_VERSION "6" CACHE STRING "AMDGPU Code object ABI to use")
109107

110108
if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
111109
# FIXME: This is a hack required to keep the CUDA package from trying to find

0 commit comments

Comments
 (0)