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