File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ elseif(UNIX)
60
60
string (CONCAT CXXFLAGS
61
61
"${WARNING_FLAGS} "
62
62
"${SDL_FLAGS} "
63
- "-fsycl "
64
63
)
65
64
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 ${CFLAGS} " )
66
65
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 ${CXXFLAGS} " )
@@ -193,14 +192,18 @@ function(build_dpctl_ext _trgt _src _dest)
193
192
install (TARGETS ${_trgt} LIBRARY DESTINATION ${_dest} )
194
193
endfunction ()
195
194
196
- file (GLOB _cython_sources *.pyx )
195
+ file (GLOB _cython_sources ${CMAKE_CURRENT_SOURCE_DIR} /*.pyx )
196
+ list (REMOVE_ITEM _cython_sources ${CMAKE_CURRENT_SOURCE_DIR} /_sycl_queue.pyx )
197
197
foreach (_cy_file ${_cython_sources} )
198
198
get_filename_component (_trgt ${_cy_file} NAME_WLE )
199
199
build_dpctl_ext (${_trgt} ${_cy_file} "dpctl" )
200
200
endforeach ()
201
201
202
+ set (_cy_file ${CMAKE_CURRENT_SOURCE_DIR} /_sycl_queue.pyx )
203
+ get_filename_component (_trgt ${_cy_file} NAME_WLE )
204
+ build_dpctl_ext (${_trgt} ${_cy_file} "dpctl" SYCL )
205
+
202
206
target_include_directories (_sycl_queue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
203
- add_sycl_to_target (TARGET _sycl_queue SOURCES _sycl_queue.cxx )
204
207
205
208
add_subdirectory (program )
206
209
add_subdirectory (memory )
Original file line number Diff line number Diff line change @@ -57,11 +57,20 @@ set(_clang_prefix "")
57
57
if (WIN32 )
58
58
set (_clang_prefix "/clang:" )
59
59
endif ()
60
- set_source_files_properties (
60
+
61
+ set (_no_fast_math_sources
61
62
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source/full_ctor.cpp
62
63
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source/linear_sequences.cpp
63
64
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source/elementwise_functions.cpp
64
- PROPERTIES COMPILE_OPTIONS "${_clang_prefix} -fno-fast-math" )
65
+ )
66
+ foreach (_src_fn ${_no_fast_math_sources} )
67
+ get_source_file_property (_cmpl_options_prop ${_src_fn} COMPILE_OPTIONS )
68
+ set (_combined_options_prop ${_cmpl_options_prop} "${_clang_prefix} -fno-fast-math" )
69
+ set_source_files_properties (
70
+ ${_src_fn}
71
+ PROPERTIES COMPILE_OPTIONS "${_combined_options_prop} "
72
+ )
73
+ endforeach ()
65
74
if (UNIX )
66
75
set_source_files_properties (
67
76
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source/elementwise_functions.cpp
You can’t perform that action at this time.
0 commit comments