Comments (4)
Those linker errors suggest you're trying to use the LAPACK interface. However, building with the cuBLAS backend doesn't enable this - that is the BLAS interface only.
I think (for I've never used it!) that you need to additionally enable the cuSOLVER backend to avoid these linking issues. You can do this by setting -DENABLE_CUSOLVER_BACKEND=ON
.
from onemkl.
Hi vidyalathabadde! Do you want to build the unit tests? If not, set -DBUILD_FUNCTIONAL_TESTS=OFF
.
Additionally, I cound that setting True
and False
didn't work. Try something similar to the following:
cmake ../oneMKL/ -GNinja -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DENABLE_CUBLAS_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DENABLE_MKLGPU_BACKEND=O
FF -DBUILD_FUNCTIONAL_TESTS=OFF
(albeit with clang++
and clang
, and whatever path you'd prefer.)
from onemkl.
Hi @hjabird,
Thank you so much for your reply. Yeah with the above command, I'm able to build the oneMKL for cuda BE.
But when I'm trying to link it with my code during compilation it gives the undefined references error.
/usr/bin/ld: /tmp/simpleCUBLAS_LU-9dfaa3.o: in function `oneapi::mkl::lapack::getrf_batch(sycl::_V1::queue&, long*, long*, double**, long*, long**, long, long*, double*, long, std::vector<sycl::_V1::event, std::allocator<sycl::_V1::event> > const&)':
simpleCUBLAS_LU-f4c50e.cpp:(.text+0x280f): undefined reference to `oneapi::mkl::lapack::detail::getrf_batch(oneapi::mkl::device, sycl::_V1::queue&, long*, long*, double**, long*, long**, long, long*, double*, long, std::vector<sycl::_V1::event, std::allocator<sycl::_V1::event> > const&)'
/usr/bin/ld: /tmp/simpleCUBLAS_LU-9dfaa3.o: in function `_ZN6oneapi3mkl6lapack27getrf_batch_scratchpad_sizeIdTnPNS1_8internal9enable_ifIXsr5is_fpIT_EE5valueEvE4typeELPv0EEElRN4sycl3_V15queueEPlSE_SE_lSE_':
simpleCUBLAS_LU-f4c50e.cpp:(.text._ZN6oneapi3mkl6lapack27getrf_batch_scratchpad_sizeIdTnPNS1_8internal9enable_ifIXsr5is_fpIT_EE5valueEvE4typeELPv0EEElRN4sycl3_V15queueEPlSE_SE_lSE_[_ZN6oneapi3mkl6lapack27getrf_batch_scratchpad_sizeIdTnPNS1_8internal9enable_ifIXsr5is_fpIT_EE5valueEvE4typeELPv0EEElRN4sycl3_V15queueEPlSE_SE_lSE_]+0x4c): undefined reference to `_ZN6oneapi3mkl6lapack6detail27getrf_batch_scratchpad_sizeIdTnPNS1_8internal9enable_ifIXsr5is_fpIT_EE5valueEvE4typeELPv0EEElNS0_6deviceERN4sycl3_V15queueEPlSG_SG_lSG_'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
command used:
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda *.cpp -I../../../Common/ -I ../../../include/ -I oneMKL/build/oneMKL_installation/include/ -L oneMKL/build/oneMKL_installation/lib/ -lonemkl_blas_cublas -lonemkl
Could you please help me out with this issue?
Thanks,
Vidya.
from onemkl.
Thanks a lot for your assistance @hjabird. It works. I'm able to compile and run the code successfully now.
from onemkl.
Related Issues (20)
- Could NOT find CBLAS (missing: CBLAS_file) HOT 2
- -DENABLE_CUFFT_BACKEND missing from documentation HOT 1
- [Build][Docs] Improve build documentation HOT 10
- Outdated conan installation instructions HOT 2
- Consider creating oneMKL releases HOT 5
- dlopen libOpenCL by SONAME to support split prefix distributions HOT 3
- Kernel verification failure during execution of axpby with complex float inputs HOT 6
- Request to implement lapack::gesv HOT 3
- Missing function rng::device::generate_single HOT 1
- Request to add compute_mode parameter for BLAS level 3 APIs (and their extensions)
- mklcpu backend is broken with adaptiveCPP
- [BLAS] Netlib backend fails to compile with AdaptiveCpp
- [BLAS] rocBLAS backend test can fail with HSA_STATUS_ERROR_INVALID_PACKET_FORMAT
- [DFT][MKLGPU] Use FWD_ and BWD_STRIDES for MKLGPU 2024.1
- [DFT] Use FWD_ and BWD_STRIDE API
- [BLAS] Wrong namespace usage in BLAS Documentation HOT 5
- pthreads not found HOT 3
- [DFT] compute_forward (forward_ip_rr) function template in forward.hpp overrides compute_forward (forward_op_cc) if in and out types are the same HOT 9
- How to setup CMakeLists to use OneMKL on a GPU (Intel Arc/Nvidia sm_89) HOT 7
- Implement CuBlas int8, float mixed precision gemm_batch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onemkl.