SYCL: do not skip CPU or FPGA if explicitly selected #9259
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It can be useful to be able to use SYCL on CPU
e.g. to run tests on a machine without a GPU.
With this commit a user can enable the use
of the CPU with the following env variable:
export ONEAPI_DEVICE_SELECTOR="opencl:cpu"
I ran the CI locally with this change and I got this error:
I guess this only happens because the code isn't supposed to run on a CPU at all and I'm running it on a CPU using this commit.
Would it be okay to make the code more generic so that it could also run on CPU? Or do you think that it would be a lot of work?
The main reason why I'm doing this is that I don't have access to a GPU that the current SYCL code can use and I had to make some changes to SYCL code because of ggerganov/ggml#940 and I didn't know how to test those changes.
Personally I don't have a problem if some tests fail on CPU, maybe this could be a "use at your own risk" mode?