Skip to content

Commit 127cf7f

Browse files
committed
fixed vortex build error due to double support
1 parent 5e6039c commit 127cf7f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ if (ENABLE_VORTEX)
18551855
message(FATAL_ERROR "should set 'VORTEX_PREFIX' option")
18561856
endif()
18571857
set(BUILD_VORTEX 1)
1858-
set(VORTEX_DEVICE_EXTENSIONS "cl_khr_byte_addressable_store")
1858+
set(VORTEX_DEVICE_EXTENSIONS "cl_khr_byte_addressable_store cl_khr_int64 cl_khr_fp64")
18591859
set(VORTEX_DEVICE_CL_VERSION_MAJOR 1)
18601860
set(VORTEX_DEVICE_CL_VERSION_MINOR 2)
18611861
set(VORTEX_DEVICE_CL_VERSION "120")

lib/kernel/vortex/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,21 @@ foreach(FILE workitems.c printf.c barrier.c)
4646
list(APPEND KERNEL_SOURCES "vortex/${FILE}")
4747
endforeach()
4848

49-
set(KERNEL_CL_FLAGS "-Xclang" "-cl-std=CL${VORTEX_DEVICE_CL_STD}" "-D__OPENCL_C_VERSION__=${VORTEX_DEVICE_CL_VERSION}" ${KERNEL_CL_FLAGS})
49+
set(KERNEL_CL_FLAGS "-Xclang" "-cl-std=CL${VORTEX_DEVICE_CL_STD}" "-D__OPENCL_C_VERSION__=${VORTEX_DEVICE_CL_VERSION}" "-Xclang" "-cl-ext=all" ${KERNEL_CL_FLAGS})
5050

5151
set(LLC_FLAGS "")
5252

53+
set(DEVICE_CL_FLAGS "-D__OPENCL_VERSION__=${VORTEX_DEVICE_CL_VERSION}")
5354
separate_arguments(VORTEX_DEVICE_EXTENSIONS)
5455
foreach(EXT ${VORTEX_DEVICE_EXTENSIONS})
5556
set(DEVICE_CL_FLAGS "${DEVICE_CL_FLAGS} -D${EXT}")
5657
endforeach()
5758
separate_arguments(DEVICE_CL_FLAGS)
5859

59-
set(CLANG_FLAGS "-ffreestanding" "-target" "${LLVM_TARGET_32}" "-march=${TARGET_MARCH_32}" "-emit-llvm" "-DPOCL_DEVICE_ADDRESS_BITS=32" "-D_CL_DISABLE_HALF" "-I${VORTEX_PREFIX}/kernel/include")
60-
set(DEVICE_CL_FLAGS "-D__OPENCL_VERSION__=${VORTEX_DEVICE_CL_VERSION} -DPOCL_DEVICE_ADDRESS_BITS=32")
60+
set(CLANG_FLAGS "-ffreestanding" "-target" "${LLVM_TARGET_32}" "-march=${TARGET_MARCH_32}" "-emit-llvm" "-DPOCL_DEVICE_ADDRESS_BITS=32" "-I${VORTEX_PREFIX}/kernel/include")
6161
make_kernel_bc(KERNEL_BC_32 "${LLVM_TARGET_32}" "VX32-BCs" 0 0 0 ${KERNEL_SOURCES})
6262

63-
set(CLANG_FLAGS "-ffreestanding" "-target" "${LLVM_TARGET_64}" "-march=${TARGET_MARCH_64}" "-emit-llvm" "-DPOCL_DEVICE_ADDRESS_BITS=64" "-D_CL_DISABLE_HALF" "-I${VORTEX_PREFIX}/kernel/include")
64-
set(DEVICE_CL_FLAGS "-D__OPENCL_VERSION__=${VORTEX_DEVICE_CL_VERSION} -DPOCL_DEVICE_ADDRESS_BITS=64")
63+
set(CLANG_FLAGS "-ffreestanding" "-target" "${LLVM_TARGET_64}" "-march=${TARGET_MARCH_64}" "-emit-llvm" "-DPOCL_DEVICE_ADDRESS_BITS=64" "-I${VORTEX_PREFIX}/kernel/include")
6564
make_kernel_bc(KERNEL_BC_64 "${LLVM_TARGET_64}" "VX64-BCs" 0 0 0 ${KERNEL_SOURCES})
6665

6766
# just debug

0 commit comments

Comments
 (0)