Skip to content

Commit e94b247

Browse files
[SYCL] Replace acc with 'fpga' in tests using ONEAPI_DEVICE_SELECTOR (#12551)
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 existing test cases to use 'fpga' instead of 'acc' in ONEAPI_DEVICE_SELECTOR. In future, we will completely drop 'acc' from device type in ONEAPI_DEVICE_SELECTOR. Partially addresses: #12387
1 parent f331ba2 commit e94b247

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

sycl/test-e2e/FilterSelector/filter_list_cpu_gpu_acc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
// RUN: %clangxx -fsycl %S/Inputs/filter_list_queries.cpp -o %t.out
1212

13-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:acc" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-ONLY
13+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:fpga" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-ONLY
1414
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-GPU-ONLY
1515
// RUN: env ONEAPI_DEVICE_SELECTOR="*:cpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-CPU-ONLY
1616
//
17-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:acc,gpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-GPU
18-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:acc,cpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-CPU
17+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:fpga,gpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-GPU
18+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:fpga,cpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-CPU
1919
//
20-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:cpu,acc,gpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-GPU-CPU
20+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:cpu,fpga,gpu" %{run-unfiltered-devices} %t.out | FileCheck %s --check-prefixes=CHECK-ACC-GPU-CPU
2121
//
2222
// CHECK-ACC-ONLY: Device: acc
2323
// CHECK-ACC-ONLY-NOT: Device: cpu

sycl/test-e2e/FilterSelector/select_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run-unfiltered-devices} %t.out
55
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run-unfiltered-devices} %t.out
66
// RUN: env ONEAPI_DEVICE_SELECTOR='*:cpu;level_zero:gpu' %{run-unfiltered-devices} %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:acc %{run-unfiltered-devices} %t.out
7+
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:fpga %{run-unfiltered-devices} %t.out
88
//
99
// Checks if only specified device types can be acquired from select_device
1010
// when ONEAPI_DEVICE_SELECTOR is set
@@ -45,7 +45,7 @@ int main() {
4545
device d = cs.select_device();
4646
}
4747
if (!envVal || forcedPIs == "*" ||
48-
forcedPIs.find("acc") != std::string::npos) {
48+
forcedPIs.find("fpga") != std::string::npos) {
4949
accelerator_selector as;
5050
device d = as.select_device();
5151
}

sycl/test-e2e/FilterSelector/select_device_acc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: env ONEAPI_DEVICE_SELECTOR='*:acc' %{run-unfiltered-devices} %t.out
2+
// RUN: env ONEAPI_DEVICE_SELECTOR='*:fpga' %{run-unfiltered-devices} %t.out
33
//
44
// Checks if only specified device types can be acquired from select_device
55
// when ONEAPI_DEVICE_SELECTOR is set

sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_several_targets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga,spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out
44

55
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:acc %{run} %t.out
6+
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:fpga %{run} %t.out
77
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} %t.out
88
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run} %t.out

sycl/test-e2e/Sampler/basic-rw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
ONEAPI_DEVICE_SELECTOR=level_zero:gpu ./binx.bin
1616
ONEAPI_DEVICE_SELECTOR=opencl:cpu ./binx.bin
1717
18-
ONEAPI_DEVICE_SELECTOR=opecl:acc ../binx.bin <-- does not support image
19-
operations at this time.
18+
ONEAPI_DEVICE_SELECTOR=opencl:fpga ../binx.bin <-- does not support
19+
image operations at this time.
2020
2121
*/
2222

0 commit comments

Comments
 (0)