From 2f847cf05fe83fd1c22bbc12f708c8c247af964e Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 4 Oct 2023 14:54:58 -0400 Subject: [PATCH] Restore default code object version usage for ROCr and ROCr Test Remove override that forces ROCr image blit source and ROCr test to use code object version 4 now that mainline has been updated to version 5. Change-Id: I94681e86835c0e382475306ead4cd4132a2ee78f --- rocrtst/suites/test_common/CMakeLists.txt | 2 +- runtime/hsa-runtime/image/blit_src/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rocrtst/suites/test_common/CMakeLists.txt b/rocrtst/suites/test_common/CMakeLists.txt index 486cc32c41..4451ee2722 100755 --- a/rocrtst/suites/test_common/CMakeLists.txt +++ b/rocrtst/suites/test_common/CMakeLists.txt @@ -290,7 +290,7 @@ function(build_kernel S_NAME TARG_DEV) set(HSACO_TARG_LIST ${HSACO_TARG_LIST} "${KERNEL_DIR}/${SNAME_KERNEL}" PARENT_SCOPE) string(SUBSTRING ${TARG_DEV} 3 -1 gfxNum) separate_arguments(CLANG_ARG_LIST UNIX_COMMAND - "-D ROCRTST_GPU=0x${gfxNum} -x cl -target amdgcn-amd-amdhsa -include ${OPENCL_INC_DIR}opencl-c.h -mcpu=${TARG_DEV} ${BITCODE_ARGS} -cl-std=CL${OPENCL_VER} -mcode-object-version=4 ${CL_FILE_LIST} -o ${KERNEL_DIR}/${SNAME_KERNEL}") + "-D ROCRTST_GPU=0x${gfxNum} -x cl -target amdgcn-amd-amdhsa -include ${OPENCL_INC_DIR}opencl-c.h -mcpu=${TARG_DEV} ${BITCODE_ARGS} -cl-std=CL${OPENCL_VER} ${CL_FILE_LIST} -o ${KERNEL_DIR}/${SNAME_KERNEL}") add_custom_command(OUTPUT "${KERNEL_DIR}/${SNAME_KERNEL}" COMMAND ${CLANG} ${CLANG_ARG_LIST} DEPENDS ${CL_FILE_LIST} ${CLANG} COMMENT "BUILDING ${KERNEL_DIR}/${SNAME_KERNEL}" VERBATIM) endfunction(build_kernel) diff --git a/runtime/hsa-runtime/image/blit_src/CMakeLists.txt b/runtime/hsa-runtime/image/blit_src/CMakeLists.txt index 1b3c7cfa3c..b17de8fc36 100644 --- a/runtime/hsa-runtime/image/blit_src/CMakeLists.txt +++ b/runtime/hsa-runtime/image/blit_src/CMakeLists.txt @@ -67,8 +67,7 @@ function(gen_kernel_bc TARGET_ID INPUT_FILE OUTPUT_FILE) separate_arguments(CLANG_ARG_LIST UNIX_COMMAND "-O2 -x cl -Xclang -finclude-default-header -cl-denorms-are-zero -cl-std=CL2.0 - -target amdgcn-amd-amdhsa -mcpu=${TARGET_ID} -mcode-object-version=4 - -o ${OUTPUT_FILE} ${INPUT_FILE}") + -target amdgcn-amd-amdhsa -mcpu=${TARGET_ID} -o ${OUTPUT_FILE} ${INPUT_FILE}") ## Add custom command to produce a code object file. ## This depends on the kernel source file & compiler.