Skip to content

Commit

Permalink
[SYCL] Update test scripts and sycl-ls to use 'fpga' with ONEAPI_DEVI…
Browse files Browse the repository at this point in the history
…CE_SELECTOR (#12596)

As per the ONEAPI_DEVICE_SELECTOR
[documentation](https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md#oneapi_device_selector),
the device type can only be cpu, gpu, or fpga (or any combination of
those). Currently, 'acc' is also accepted by ONEAPI_DEVICE_SELECTOR as a
valid device type, which is incorrect.

This PR modifies lit.cfg.py and sycl-ls to use 'fpga' instead of 'acc'
in ONEAPI_DEVICE_SELECTOR.
  • Loading branch information
uditagarwal97 authored Feb 6, 2024
1 parent 2f253a9 commit 2c85e99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
config.sycl_devices = [x.replace("ext_oneapi_", "") for x in config.sycl_devices]

available_devices = {
"opencl": ("cpu", "gpu", "acc"),
"opencl": ("cpu", "gpu", "fpga"),
"cuda": "gpu",
"level_zero": "gpu",
"hip": "gpu",
Expand Down
2 changes: 1 addition & 1 deletion sycl/tools/sycl-ls/sycl-ls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ std::string getDeviceTypeName(const device &Device) {
case info::device_type::host:
return "host";
case info::device_type::accelerator:
return "acc";
return "fpga";
default:
return "unknown";
}
Expand Down

0 comments on commit 2c85e99

Please sign in to comment.