Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal instruction error with oneMKL mt2203 instruction #441

Open
Shwetha-Selma opened this issue Jan 23, 2024 · 5 comments
Open

Illegal instruction error with oneMKL mt2203 instruction #441

Shwetha-Selma opened this issue Jan 23, 2024 · 5 comments
Assignees

Comments

@Shwetha-Selma
Copy link

Shwetha-Selma commented Jan 23, 2024

Summary

MersenneTwisterGP11213 Sample migrated from CUDA fails on NVIDIA GPU with opensource oneMKL library - Illegal instruction (core dumped)

checkCudaErrors(DPCT_CHECK_ERROR(prngGPU = dpct::rng::create_host_rng(
                                       dpct::rng::random_engine_type::mt2203)));

Version

onemkl version - https://github.com/oneapi-src/oneMKL/releases/tag/v0.3

Environment

  • HW - Tesla P100-PCIE-12GB
  • OS name and version - Ubuntu* 22.04
  • Compiler version - clang version 18.0.0git (https://github.com/intel/llvm 3468f496c04ca9091da19ff5c73aa5f7ef792924)
  • output log -
./a.out Starting...

 Allocating data for 2400000 samples...
 Seeding with 777 ...

 Illegal instruction (core dumped)

Steps to reproduce

Code Repo - MersenneTwister
Compile command - clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda MersenneTwister.cpp.dp.cpp -I../../../Common/ -I ../../../include/ -I -L -lonemkl_rng_curand -lonemkl

Observed behavior

Sample executes successfully with Intel oneMKL library on intel hardware(Gen9, Gen11)

Expected output

/a.out Starting...

Allocating data for 2400000 samples...
Seeding with 777 ...
Generating random numbers on GPU...


Reading back the results...
Shutting down...
@Shwetha-Selma
Copy link
Author

Hi, Any update on this issue, can someone help with this ?

@Shwetha-Selma
Copy link
Author

@aelizaro any update?

@aelizaro
Copy link
Contributor

aelizaro commented Feb 9, 2024

Hi, @Shwetha-Selma, sorry for the delayed responce, I missed this issue.

MT2203 generator is not yet available via oneMKL interfaces project, only via Intel oneMKL and so it can be used only on x86 CPUs and Intel's GPUs from the oneAPI package (however illegal instruction issue is a surprise, I can check it within dpct tool). In order to run on Tesla P100-PCIE-12GB, please, try another generator available in OneMKL Interfaces with cuRAND backend (Philox4x32x10 or mrg32k3a)

or if the point is the sample migration itself - you can build it with icpx compiler, link it against Intel oneMKL but it won't work on NVIDIA HW yet, you can validate it on x86 CPU:

icpx -fsycl -DMKL_ILP64 -I"${MKLROOT}/include MersenneTwister.cpp.dp.cpp -L${MKLROOT}/lib -lmkl_sycl_rng -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -lsycl -lpthread -lm -ldl

@Shwetha-Selma
Copy link
Author

Thanks @aelizaro for confirming MT2203 generator is not yet available for the NVIDIA backend. And It would be helpful if you check about the 'Illegal instruction' error.

Also Is there any plan to include support for MT2203 generator with open-source oneMKL?

@aelizaro
Copy link
Contributor

@Shwetha-Selma, yes, we plan to extend oneMKL Interfaces with more generators, the ones which are used in DPCT as the first priority, but no exact timeline yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants