Hey, I think I found the way to install OpenCL in wsl. Your method is correct, and you need to add the $ export POCL_BUILDING=1
and export OCL_ICD_VENDORS={full-path-to-your-build-dir}/ocl-vendors/
in your Renviron.site (basically at /usr/lib/R/etc/Renviron.site
).
As me, I add these two environment variable in Renviron.site and the test code run correctly.
You can also test whether the OpenCL install correctly by using r backage OpenCL
with OpenCL::oclDevices()
. As you see, the OpenCL device shown correctly in R