From d878e239353e27eb287844b7d9da79dff6dbbab5 Mon Sep 17 00:00:00 2001 From: "Ni, Wenhui" Date: Sun, 25 Jun 2023 09:16:45 +0800 Subject: [PATCH 1/2] Add new link command for mkl on cuda Signed-off-by: Ni, Wenhui --- help_function/test_help.py | 5 +++-- test_config.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/help_function/test_help.py b/help_function/test_help.py index 1ccb5db39..637d12682 100644 --- a/help_function/test_help.py +++ b/help_function/test_help.py @@ -86,8 +86,9 @@ def build_test(): if (test_config.current_test in blas_cases) or (test_config.current_test in fft_cases) or ( test_config.current_test in lapack_cases) or (test_config.current_test in rng_cases) or ( test_config.current_test in oneDNN_related) or (test_config.current_test in sparse_cases): - mkl_opts = [] - if platform.system() == "Linux": + if test_config.device_filter == "cuda:gpu" : + mkl_opts = test_config.mkl_cuda_link_lin + elif platform.system() == "Linux": mkl_opts = test_config.mkl_link_opt_lin else: mkl_opts = test_config.mkl_link_opt_win diff --git a/test_config.py b/test_config.py index bf1d7e660..fc6e1ff76 100644 --- a/test_config.py +++ b/test_config.py @@ -44,6 +44,8 @@ mkl_link_opt_lin = ["-lmkl_intel_ilp64", "-lmkl_sequential", "-lmkl_core", "-lOpenCL", "-lmkl_sycl", "-lpthread", "-ldl"] +mkl_cuda_link_lin = ["-lonemkl", "-lonemkl_blas_cublas", "-lpthread", "-ldl", "-lOpenCL"] + mkl_link_opt_win = ["mkl_sycl_dll.lib", "mkl_intel_ilp64_dll.lib", "mkl_sequential_dll.lib", "mkl_core_dll.lib", "OpenCL.lib"] mkl_comp_opt = ["-DMKL_ILP64"] From a738b8e9e2906b51484667de8919586e1c7766c2 Mon Sep 17 00:00:00 2001 From: wenhuiNi Date: Mon, 3 Jul 2023 14:00:20 +0800 Subject: [PATCH 2/2] Update test_config.py Co-authored-by: Jiang, Zhiwei --- test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_config.py b/test_config.py index 785859dbf..83a3b0a2d 100644 --- a/test_config.py +++ b/test_config.py @@ -44,7 +44,7 @@ mkl_link_opt_lin = ["-lmkl_intel_ilp64", "-lmkl_sequential", "-lmkl_core", "-lOpenCL", "-lmkl_sycl", "-lpthread", "-ldl"] -mkl_cuda_link_lin = ["-lonemkl", "-lonemkl_blas_cublas", "-lpthread", "-ldl", "-lOpenCL"] +mkl_cuda_link_lin = ["-lonemkl"] mkl_link_opt_win = ["mkl_sycl_dll.lib", "mkl_intel_ilp64_dll.lib", "mkl_sequential_dll.lib", "mkl_core_dll.lib", "OpenCL.lib"]