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

runtime error when running Cuda backend for SYCL - returns CL_INVALID_VALUE -30 error #1119

Closed
varsha-madananth opened this issue Feb 12, 2020 · 9 comments
Assignees
Labels
cuda CUDA back-end invalid This doesn't seem right

Comments

@varsha-madananth
Copy link

I built sycl toolchain with support for nvidia cuda. The app builds find on -fsycl-targets=nvptx64-nvidia-cuda-sycldevice. I get the following error when i run the exe. I have attached the compile commands and also gdb output. Any help debugging would be appreciated.

clinfo -l
Platform #0: Intel(R) FPGA Emulation Platform for OpenCL(TM)
-- Device #0: Intel(R) FPGA Emulation Device Platform #1: Intel(R) OpenCL -- Device #0: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Platform #2: NVIDIA CUDA
`-- Device #0: GeForce GTX 1080

simplesyclapplogs.txt

Thanks,
Varsha

@bader
Copy link
Contributor

bader commented Feb 12, 2020

@varsha-madananth, according to the log, your application used OpenCL back-end, which seems unintentional.
I suggest checking if SYCL_BE environment variable is set like this SYCL_BE=PI_CUDA.
Also it would be great if queue is created with device selector argument to make sure that application is using correct device.
More information how to build/run SYCL applications using CUDA back-end you can find here: https://github.com/codeplaysoftware/sycl-for-cuda/blob/cuda/sycl/doc/GetStartedWithSYCLCompiler.md.
Tagging @Ruyk, who can correct me if I got it wrong.

@bader bader added the invalid This doesn't seem right label Feb 12, 2020
@varsha-madananth
Copy link
Author

varsha-madananth commented Feb 12, 2020

@bader : I have followed the instructions from https://github.com/codeplaysoftware/sycl-for-cuda/blob/cuda/sycl/doc/GetStartedWithSYCLCompiler.md.
Currently, the executable does not work with SYCL_BE=PI_CUDA not set as per the documentation.
If i do not set the variable, i get the following. This is how i know the env was set in the logs which was attached.

Build program log for 'GeForce GTX 1080':
:1:2: error: source file is not valid UTF-8
PU<U+0001>
^
:1:1: error: unknown type name 'P'
PU<U+0001>
^
:1:4: error: source file is not valid UTF-8
PU<U+0001>
^
:1:3: error: variable has address space that is not supported in program scope declaration
PU<U+0001>
^
:1:4: error: expected ';' after top level declarator
PU<U+0001>
^
;
0 (CL_SUCCESS)

However, there has been changes to the codebase yesterday which gives build errors while doing a make on sycl-for-cuda. I probably will have to open another issue for that. I will keep you posted.

Thanks,
Varsha

@Ruyk
Copy link
Contributor

Ruyk commented Feb 14, 2020

There is an issue on the default device selection introduced by the latest PI plugin changes. Basically, SYCL_BE is ignored when using default selection, and can return an opencl device when there is no SPIRV binary or viceversa. We are working on a fix for that on the cuda-dev branch. This also affects a number of LIT tests, in case you see failures there.

@bader bader added the cuda CUDA back-end label Feb 18, 2020
@Ruyk
Copy link
Contributor

Ruyk commented Feb 26, 2020

The CUDA backend has been merged, this problem should be solved now. Could you try again and let us know?

@jinz2014
Copy link
Contributor

jinz2014 commented Feb 28, 2020

I also got the same error (sycl branch). Could you add the change to the sycl branch ?

https://github.com/codeplaysoftware/sycl-for-cuda/blob/cuda/sycl/doc/GetStartedWithSYCLCompiler.md

People follow the get started guide. Could you please sort out or clean up the guide so that people can focus on building the CUDA backend ? Currently, they are mixed together.

Thanks

@Ruyk
Copy link
Contributor

Ruyk commented Mar 13, 2020

#1293

@bader
Copy link
Contributor

bader commented Mar 17, 2020

@varsha-madananth, does #1293 with clarified instructions fix your problem?

@jinz2014
Copy link
Contributor

jinz2014 commented Mar 17, 2020 via email

@bader
Copy link
Contributor

bader commented Mar 17, 2020

@Ruyk, 👍.

@bader bader closed this as completed Mar 17, 2020
bader pushed a commit to bader/llvm that referenced this issue Jul 11, 2024
Add support for lowering copies of SRF_2x32 registers.
This fixes issue reported in intel#1119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants