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)
- cublas supports 64-bit interface
- Support external workspace and workspace size query in DFT domain HOT 8
- Layout mismatch HOT 3
- Don't use `sycl::detail` namespace HOT 2
- combine omat and imat ?
- Some tests hang/slow down significantly when running with portBLAS HOT 1
- Native context reinterpret casted as `pi_context`
- CUDA backend is broken with hipSYCL
- #include <oneapi/mkl.hpp>
- create device RNG engine to host. HOT 5
- Illegal instruction error with oneMKL mt2203 instruction HOT 5
- [CMake][DFT] target_link_library(myTarget PRIVATE MKL::onemkl_dft_XXX) does not add includes
- [CMake] New users can struggle with the CBLAS testing dependency when building oneMKL - what to do? HOT 1
- [CMake][cuBLAS]Unable to build cublas backend with a default CMake command HOT 3
- Missing gemm_batch data types HOT 3
- const scaling paramters not supported for gemm_batch HOT 1
- oneMKL's CMake Does Not Detect SYCL Support when Compiled with `intel/llvm` HOT 1
- Could NOT find CBLAS (missing: CBLAS_file) HOT 2
- -DENABLE_CUFFT_BACKEND missing from documentation HOT 1
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.