oneMKL icon indicating copy to clipboard operation
oneMKL copied to clipboard

Why SYCL is a must fof this oneMKL? Instead of CUDA support?

Open jiapei100 opened this issue 2 years ago • 7 comments

How can I build oneMKL with CUDA under Ubuntu 22.04 ? Without using SYCL ?

jiapei100 avatar Jun 11 '22 04:06 jiapei100

Hello @jiapei100,

I will try to answer your questions.

How can I build oneMKL with CUDA under Ubuntu 22.04 ?

To build oneMKL with CUDA, you just need to follow the build instructions. You will need a compiler that supports SYCL. So you just need to install intel/llvm. Furthermore, oneMKL is an interface that calls the backend libraries.

Without using SYCL ?

You can't build oneMKL without SYCL support. oneMKL uses the C++ language of course, but it also uses an abstraction layer called SYCL, which is a kind of overlay of C++ if you will. With the compiler above you will use the Intel oneAPI Data Parallel C++ (DPC++) APIs of SYCL. As you can see in the README.md, oneMKL provides users with an interface, called oneAPI, that uses DPC++. So it is not possible to build oneMKL without SYCL support.

I hope I have answered all your questions. Don't hesitate to report any misunderstanding you may have,

Sholde avatar Jun 11 '22 10:06 Sholde

@Sholde Thanks for the explanations. :) As mentioned by @Sholde oneMKL interfaces project is part of oneAPI that is based on DPC++/SYCL. The purpose here is, use oneAPI and run it on every hardware. In this particular case (oneMKL interfaces repo), the purpose is to create an interface layer that can be used to run oneMKL APIs on every hardware. So, you will need a SYCL implementation (such as DPC++, LLVM or hipSYCL) to be able to build oneMKL interfaces and then you can choose the backend depending on the hardware you have. For NVIDIA GPUs, you need either LLVM compiler with CUDA backend. Hope this helps answering the question.

mmeterel avatar Jun 12 '22 04:06 mmeterel

@jiapei100 if the provided answers are sufficient, can we close this issue?

mmeterel avatar Jun 15 '22 21:06 mmeterel

@mmeterel

Thank you so much ...

I got a AMD Ryzen Threadripper 3960X 24-Core Processor CPU, with NVidia Geforce 2080 Ti GPU. It seems I need to have hipSYCL.. Am I right?

jiapei100 avatar Jun 17 '22 06:06 jiapei100

@jiapei100 Looks like you can actually use LLVM compiler with CUDA backend - this will allow you to use cuBLAS/cuSOLVER/cuRAND backends with oneMKL interfaces.

mmeterel avatar Jun 17 '22 16:06 mmeterel

Thank you @mmeterel ...

I still have some conern:

  • Is ISPC specifically for Intel chips and Intel chips ONLY ?? What if I have a AMD chip?
  • If YES, is it possible to build ISPC for AMD chips ?

jiapei100 avatar Jun 18 '22 20:06 jiapei100

@jiapei100 I am not familiar with ISPC and do not want to give wrong information. I would suggest posting this question to ISPC repo.

mmeterel avatar Jun 18 '22 21:06 mmeterel

Closing this issue, since the original question is answered.

mmeterel avatar Sep 14 '22 05:09 mmeterel

You do understand clang also supports cuda? As good as nvcc. And one can just say that PTX and Streaming assembler, SASS, is just SYCL.

ValZapod avatar Oct 07 '22 07:10 ValZapod