Due to a problem in the Intel® oneAPI Base Toolkit, you might see this error when simulating either an offload accelerator or SYCL* HLS project. You are most likely to see this error if the CL_CONTEXT_MPSIM_DEVICE_INTELFPGA environment variable is set incorrectly. This problem might also occur when the Khronos\OpenCL\Vendors registry entries are incorrect.
Caught a SYCL host exception:
No device of requested type available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (PI_ERROR_DEVICE_NOT_FOUND)
To avoid this error,
- ensure the CL_CONTEXT_MPSIM_DEVICE_INTELFPGA environment variable is set to 1. There are 3 ways to do this:
- Linux: export CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
- Windows CMD: set “CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1”
- Windows Powershell: $env: CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
- unset the environment variable after, or the emulator device won’t work:
- Linux: export CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=
- Windows CMD: set “CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=”
- Windows Powershell: Remove-Item Env:CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
- remove unnecessary registry entries in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors. It should look like this: