File tree Expand file tree Collapse file tree 5 files changed +38
-0
lines changed
test/dpct/cmake_migration/case_012 Expand file tree Collapse file tree 5 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %T && mkdir -p %T
2
+ // RUN: cd %T
3
+ // RUN: cp %S/input.cmake ./input.cmake
4
+ // RUN: dpct -in-root ./ -out-root out ./input.cmake --migrate-cmake-script-only
5
+ // RUN: echo "begin" > %T/diff.txt
6
+ // RUN: diff --strip-trailing-cr %S/expected.txt %T/out/input.cmake >> %T/diff.txt
7
+ // RUN: echo "end" >> %T/diff.txt
8
+
9
+ // CHECK: begin
10
+ // CHECK-NEXT: end
Original file line number Diff line number Diff line change
1
+ dpct_add_mkl_to_target(culib)
2
+ dpct_add_mkl_to_target(
3
+ culib
4
+ )
Original file line number Diff line number Diff line change
1
+ CUDA_ADD_CUFFT_TO_TARGET (culib )
2
+ cuda_add_cufft_to_target (
3
+ culib
4
+ )
Original file line number Diff line number Diff line change 508
508
Out : " "
509
509
MatchMode : Full
510
510
RuleId : " remove_-static-libstdc++"
511
+
511
512
- Rule : rule_cuda_compile_fatbin
512
513
Kind : CMakeRule
513
514
Priority : Fallback
527
528
CmakeSyntax : cuda_compile_fatbin_opts
528
529
In : dpct_helper_compile_sycl_code(${value} OPTIONS ${options})
529
530
Out : dpct_helper_compile_sycl_code(${value})
531
+
532
+ - Rule : rule_cuda_add_cufft_to_target
533
+ Kind : CMakeRule
534
+ Priority : Fallback
535
+ CmakeSyntax : cuda_add_cufft_to_target
536
+ In : cuda_add_cufft_to_target(${target})
537
+ Out : dpct_add_mkl_to_target(${target})
538
+
Original file line number Diff line number Diff line change @@ -96,3 +96,14 @@ if(WIN32)
96
96
else ()
97
97
set (DNN_LIB "dnnl" )
98
98
endif ()
99
+
100
+ # Link MKL library to target
101
+ macro (DPCT_ADD_MKL_TO_TARGET target )
102
+ if (WIN32 )
103
+ target_link_libraries (${target} mkl_sycl_dll.lib mkl_intel_ilp64_dll.lib mkl_tbb_thread_dll.lib mkl_core_dll.lib OpenCL.lib )
104
+ elseif (UNIX AND NOT APPLE )
105
+ target_link_libraries (${target} -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -lOpenCL -lmkl_sycl -lpthread -ldl )
106
+ else ()
107
+ message (FATAL_ERROR "Unsupported platform" )
108
+ endif ()
109
+ endmacro ()
You can’t perform that action at this time.
0 commit comments