oneapi-src / oneapi-src/oneAPI-samples
Unable to run sample SYCL program
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 745
- PR merge metrics
- No merged PRs in 30d
Description
Summary
I have built SYCL compiler from the source. I was trying out the example given in the below documentation :
https://intel.github.io/llvm-docs/GetStartedGuide.html#run-simple-dpc-application
After building the compiler from source, I have updated my environment as suggested
export PATH=$DPCPP_HOME/llvm/build/bin:$PATH
export LD_LIBRARY_PATH=$DPCPP_HOME/llvm/build/lib:$LD_LIBRARY_PATH
I could build the binary successfully, however on running that executable , I am getting below error
Command used to generate binary
clang++ -fsycl simple_sycl.cpp -o syc
./syc
terminate called after throwing an instance of 'sycl::_V1::runtime_error'
what(): No device of requested type available. -1 (PI_ERROR_DEVICE_NOT_FOUND)
Aborted (core dumped)
Version
Tip commit of git
3df87e20569ea63d0a74de525b6d19788dd8afca
Environment
OS
Ubuntu 20.04.3 LTS
CPU information
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 43 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 12
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
Stepping: 0
CPU MHz: 2194.844
Steps to reproduce
Command used to generate binary
clang++ -fsycl simple_sycl.cpp -o syc
./syc
Observed behavior
I am suspecting missing runtime libraries.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GetStartedGuide linked in the issue, then review the commands used to build and run simple_sycl.cpp and the reported PI_ERROR_DEVICE_NOT_FOUND message. Confirm whether the documented environment and runtime libraries provide a usable device on the stated Ubuntu CPU system; done means the sample executable runs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ubuntu
- Domain
- developer-experience, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100