- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to convert cuFFT code using the cuda conversion tool.
It generates dpcpp code with the function dpct::fft::fft, when I compile that code using the following command:
icpx -fsycl 1d_c2c_example.cpp.dp.cpp
it generates the following error:
1d_c2c_example.cpp.dp.cpp:62:11: error: no member named 'fft' in namespace 'dpct'
dpct::fft::fft_engine_ptr plan;
~~~~~~^
And the same error is generated when I compile for GPU using the flag:
-fsycl-targets=nvptx64-nvidia-cuda
I can't find any documentation for dpct::fft::fft, and I am using the latest release for the Intel oneAPI base toolkit.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Could you please let us know the OS details and Hardware details?
In case, if you are using Nvidia hardware then you need to use the Open Source MKL as Intel oneMKL is not supported.
Could you please let us know the complete steps/procedure you followed to migrate the cuda code to dpc++? And also, could you please confirm if you had migrated all the headers properly or not?
If possible, could you please provide us with the complete project file you are using?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for your response.
OS: Ubuntu 20.04.5
HW: Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GH + Tesla V100
oneAPI version: Intel(R) oneAPI DPC++/C++ Compiler 2023.2.0 (2023.2.0.20230622)
CUDA: release 12.0, V12.0.76
cuFFT Code to convert: https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuFFT/1d_c2c
Command used to convert:
c2s -in-root=. --extra-arg=-xc++ 1d_c2c_example.cpp --cuda-include-path=/usr/local/cuda/include
Compile generated files:
icpx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -c 1d_c2c_example.cpp.dp.cpp -o a.o
Listed above all details about the project, the generated code is not fully migrated, but the error mentioned above is related to dpct::fft which is not mentioned in any DPC++ documentation, Isn't oneMKL an open source MKL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the details.
Intel oneAPI DPC++ can be used only with Intel GEN9 and higher GPUs.
Here is the link for Intel® oneAPI DPC++/C++ Compiler System Requirements:
If you want to use the DPC++ compiler with NVIDIA GPU you can use the opensource DPC++ compiler.
Please refer to the below link regarding the opensource oneAPI DPC++ compiler:
https://intel.github.io/llvm-docs/GetStartedGuide.html
These forums are intended to support queries related to Intel Products. Here, we do not provide support to the NVidia GPU and c2s. You can also get support for non-Intel GPUs. Please find the link for raising the queries: https://github.com/intel/llvm/issues
https://github.com/oneapi-src/SYCLomatic/issues
>> Isn't oneMKL an open source MKL?
Intel oneMKL is not entirely open source but is free to download and use the latest version. If you want to use the open-source MKL, please find the below link:
https://github.com/oneapi-src/oneMKL
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Apologies for the inconvenience caused to you. Yes, it will work only if there are plugins. When we tried the code using c2s along with the command add "--gen-helper-function" which will generate helper function files in the --out-root directory. It will create an include directory in the out-root directory.
Also, you can add the header #include <dpct/fft_utils.hpp> to the migrated code and compile with the below command:
icpx -fsycl 1d_c2c_example.cpp.dp.cpp -I include/ -I ../../utils/ -qmkl
Could you please try and let us know if you are able to compile without any errors?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. Could you please provide us with an update on your issue?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Thanks for your reply!
I've tried the steps provided and it fixed the error regarding the fft function!
My concern is that the generated code is compiled only for CPU, and when I try to compile it for GPU using the command line flag "-fsycl-targets=<>" it generates GPU code, but when executed the output result for the FFT operation is the same exact as the input array, which means the most probably the oneMKL FFT operation is not supported on GPU, can you please verify this assumption?
Thanks,
Alaa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your reply.
Could you please provide us with the migrated code that you are able to run the code successfully on the CPU?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Apologies for the delay.
We tried executing the migrated code and here are our observations
Compilation command on CPU/GPU): icpx -fsycl 1d_c2c_example.cpp.dp.cpp -I include/ -I ../../utils/ -qmkl
Execution command: SYCL_PI_TRACE=1 ./a.out
The migrated code gives the expected results when running on both Intel CPU & GPU. Please find the below attached screenshot for more details.
>>when executed the output result for the FFT operation is the same exact as the input array, which means the most probably the oneMKL FFT operation is not supported on GPU
As you are trying to run the migrated code on NVIDIA GPU you need to link it against open-source oneMKL https://github.com/oneapi-src/oneMKL and not Intel oneMKL. If you still get incorrect results please raise an issue here (https://github.com/oneapi-src/oneMKL/issues) to get better assistance as here we only provide support to the queries related to Intel products.
You can get back to us if you face any issues with the results on Intel CPU/GPU.
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. Could you please let us know if you need any other details? If not, can we go ahead and close this thread?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. We assume that your issue is resolved. This thread will no longer be monitored by Intel. If you have any other queries, please start a new thread.
Thanks & Regards,
Varsha
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page