-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][XPTI] Enable XPTI tests #4545
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b25beec
[SYCL][XPTI] Enable XPTI tests
alexbatashev 4bb1320
Add some windows hacks
alexbatashev 9d1f7d2
clang-format
alexbatashev 91be5db
more windows stuff
alexbatashev 5250fe2
llvm-test-suite stuff
alexbatashev e0ee625
Address some feedback
alexbatashev bc2716c
Merge remote-tracking branch 'upstream/sycl' into xpti_tests_enable
alexbatashev 0ecdaa7
address feedback
alexbatashev 3bc6f5b
Address Tim's comment
alexbatashev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
cmake_minimum_required(VERSION 2.8.9) | ||
project (xpti) | ||
file(GLOB SOURCES *.cpp) | ||
include_directories(${XPTI_DIR}/include) | ||
add_definitions(-DXPTI_STATIC_LIBRARY) | ||
add_library(xpti STATIC ${SOURCES}) | ||
include(GNUInstallDirs) | ||
|
||
macro(add_xpti_lib target_name) | ||
add_library(${target_name} STATIC ${ARGN}) | ||
target_compile_definitions(${target_name} PRIVATE -DXPTI_STATIC_LIBRARY) | ||
target_include_directories(${target_name} PRIVATE ${XPTI_DIR}/include) | ||
|
||
if (MSVC) | ||
target_compile_options(${target_name} PRIVATE /EHsc) | ||
endif() | ||
|
||
# Set the location of the library installation | ||
install(TARGETS ${target_name} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT xpti | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT xpti | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT xpti | ||
) | ||
endmacro() | ||
|
||
set(SOURCES | ||
xpti_proxy.cpp | ||
) | ||
|
||
add_xpti_lib(xpti ${SOURCES}) | ||
|
||
# Handle the debug version for the Microsoft compiler as a special case by | ||
# creating a debug version of the static library that uses the flags used by | ||
# the SYCL runtime | ||
if (MSVC) | ||
add_library(xptid STATIC ${SOURCES}) | ||
add_xpti_lib(xptid STATIC ${SOURCES}) | ||
target_compile_options(xptid PRIVATE ${XPTI_CXX_FLAGS_DEBUG}) | ||
target_compile_options(xpti PRIVATE ${XPTI_CXX_FLAGS_RELEASE}) | ||
endif() | ||
|
||
# Set the location of the library installation | ||
install(TARGETS xpti DESTINATION ${CMAKE_BINARY_DIR}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
cmake_minimum_required(VERSION 2.8.9) | ||
project (run_test) | ||
|
||
file(GLOB SOURCES *.cpp *.hpp) | ||
include_directories(${XPTIFW_DIR}/include) | ||
include_directories(${XPTI_DIR}/include) | ||
|
||
remove_definitions(-DXPTI_STATIC_LIBRARY) | ||
add_definitions(-DXPTI_API_EXPORTS -g -O3) | ||
add_executable(run_test ${SOURCES}) | ||
add_dependencies(run_test xptifw) | ||
target_link_libraries(run_test PRIVATE xptifw) | ||
if(UNIX) | ||
target_link_libraries(run_test PRIVATE dl) | ||
endif() | ||
add_executable(XPTIFWBasicTests ${SOURCES}) | ||
target_link_libraries(XPTIFWBasicTests PRIVATE xptifw ${CMAKE_DL_LIBS}) | ||
|
||
if (XPTI_ENABLE_TBB) | ||
target_link_libraries(run_test PRIVATE tbb) | ||
if (UNIX) | ||
target_compile_definitions(XPTIFWBasicTests PRIVATE -gline-tables-only -O3) | ||
smaslov-intel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
endif() | ||
|
||
# Set the location of the library installation | ||
install(TARGETS run_test DESTINATION ${CMAKE_BINARY_DIR}) | ||
# There's a XPTI_ENABLE_TBB guard in xptifw/CMakeLists.txt | ||
target_link_libraries(XPTIFWBasicTests PRIVATE tbb) | ||
|
||
# Override default LLVM bin location | ||
set_target_properties(XPTIFWBasicTests | ||
PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
add_custom_target(check-xptifw-basictest COMMAND | ||
$<TARGET_PROPERTY:XPTIFWBasicTests,RUNTIME_OUTPUT_DIRECTORY>/XPTIFWBasicTests) | ||
add_dependencies(check-xptifw-basictest XPTIFWBasicTests) | ||
add_dependencies(check-xptifw check-xptifw-basictest) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.