Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions omniscidb/QueryEngine/GpuSharedMemoryUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ void GpuSharedMemCodeBuilder::codegenReduction(const CompilationOptions& co) {
"f32:32:32-f64:64:64-v16:16:16-"
"v32:32:32-v64:64:64-v128:128:128-n16:32:64");
reduction_code.module->setTargetTriple("nvptx64-nvidia-cuda");

#ifdef HAVE_L0
reduction_code.module->setDataLayout(
"e-p:64:64:64-i1:8:8-i8:8:8-"
"i16:16:16-i32:32:32-i64:64:64-"
"f32:32:32-f64:64:64-v16:16:16-"
"v32:32:32-v64:64:64-v128:128:128-n16:32:64");
reduction_code.module->setTargetTriple("spir64-unknown-unknown");
#endif

llvm::Linker linker(*module_);
std::unique_ptr<llvm::Module> owner(reduction_code.module);
bool link_error = linker.linkInModule(std::move(owner));
Expand Down
13 changes: 13 additions & 0 deletions omniscidb/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,19 @@ if(ENABLE_L0)
add_executable(SpirvBuildTest SpirvBuildTest.cpp)
add_executable(DataMgrWithL0Test DataMgrWithL0Test.cpp)
add_executable(IntelGPUEnablingTest IntelGPUEnablingTest.cpp)
add_executable(GpuSharedMemoryTestIntel GpuSharedMemoryTestIntel.cpp ResultSetTestUtils.cpp)

target_link_libraries(L0MgrExecuteTest L0Mgr gtest ${llvm_libs} Logger OSDependent)
target_link_libraries(SpirvBuildTest gtest ${llvm_libs})
target_link_libraries(DataMgrWithL0Test DataMgr gtest)
target_link_libraries(IntelGPUEnablingTest gtest QueryEngine ArrowQueryRunner)
target_link_libraries(GpuSharedMemoryTestIntel gtest QueryEngine ArrowQueryRunner)

add_test(L0MgrExecuteTest L0MgrExecuteTest ${TEST_ARGS})
add_test(SpirvBuildTest SpirvBuildTest ${TEST_ARGS})
add_test(DataMgrWithL0Test DataMgrWithL0Test ${TEST_ARGS})
add_test(IntelGPUEnablingTest IntelGPUEnablingTest ${TEST_ARGS})
add_test(GpuSharedMemoryTestIntel GpuSharedMemoryTestIntel ${TEST_ARGS})
endif()

add_executable(CostModelTest CostModel/CostModelTest.cpp)
Expand Down Expand Up @@ -140,6 +143,10 @@ if(ENABLE_CUDA)
target_link_libraries(GpuSharedMemoryTest gtest Logger QueryEngine)
endif()

if(ENABLE_L0)
target_link_libraries(GpuSharedMemoryTestIntel gtest Logger QueryEngine)
endif()

set(TEST_ARGS "--gtest_output=xml:../")
add_test(UtilTest UtilTest ${TEST_ARGS})
add_test(ArrowBasedExecuteTest ArrowBasedExecuteTest ${TEST_ARGS})
Expand Down Expand Up @@ -178,6 +185,7 @@ if(ENABLE_CUDA)
add_test(GpuSharedMemoryTest GpuSharedMemoryTest ${TEST_ARGS})
endif()
if(ENABLE_L0)
add_test(GpuSharedMemoryTestIntel GpuSharedMemoryTestIntel ${TEST_ARGS})
add_test(NAME PuntToCpu COMMAND ArrowBasedExecuteTest "--gtest_filter=Select.Punt*" ${TEST_ARGS})
set_tests_properties(PuntToCpu PROPERTIES LABELS "enabling")
endif()
Expand Down Expand Up @@ -233,6 +241,9 @@ if(ENABLE_CUDA)
list(APPEND TEST_PROGRAMS GpuSharedMemoryTest)
endif()

if(ENABLE_L0)
list(APPEND TEST_PROGRAMS GpuSharedMemoryTestIntel)
endif()
#if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
# list(APPEND TEST_PROGRAMS UdfTest)
#endif()
Expand Down Expand Up @@ -286,9 +297,11 @@ if(ENABLE_L0)
SpirvBuildTest
L0MgrExecuteTest
IntelGPUEnablingTest
GpuSharedMemoryTestIntel
)
set_tests_properties(${ENABLING_TESTS} PROPERTIES LABELS "enabling")


add_custom_target(enabling_tests
COMMAND mkdir -p tmp
COMMAND touch tmp/DictPayload
Expand Down
Loading