Skip to content

[SYCL][E2E] Update some incompatible requirements #18007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sycl/test-e2e/AOT/multiple-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir, opencl-cpu-rt
// REQUIRES: opencl-aot, ocloc, any-device-is-cpu, any-device-is-gpu, target-spir, opencl-cpu-rt

// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen %S/Inputs/aot.cpp -c -o %t.o

// CPU, GPU
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_cpu_gpu.out
// RUN: %if gpu || cpu %{ %{run} %t_cpu_gpu.out %}
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_cpu_gpu.out
// RUN: %{run} %t_cpu_gpu.out

// No AOT-compiled image for CPU
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_gpu.out
// Check that execution on AOT-compatible devices is unaffected
// RUN: %{run} %t_spv_gpu.out
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t_spv_gpu.out

// No AOT-compiled image for GPU
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64 %t.o -o %t_spv_cpu.out
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64 %t.o -o %t_spv_cpu.out
// Check that execution on AOT-compatible devices is unaffected
// RUN: %{run} %t_spv_cpu.out
// RUN: env ONEAPI_DEVICE_SELECTOR="*:cpu" %{run-unfiltered-devices} %t_spv_cpu.out

// No AOT-compiled image for FPGA
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_cpu_gpu.out
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_cpu_gpu.out
// Check that execution on AOT-compatible devices is unaffected
// RUN: %{run} %t_spv_cpu_gpu.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: linux, cpu && (gpu && level_zero)
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_asan_flags -DMALLOC_DEVICE -O2 -g -o %t
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to other tests in this dir - I believe it's just a typo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is not a typo, but maybe I used wrong pattern.
I want this test can be tested on machines which have both CPU and GPU, as you can see

sycl::queue gpu_queue(sycl::gpu_selector_v);
sycl::queue cpu_queue(sycl::cpu_selector_v);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I got it, I'll update the REQUIRES string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this string - 7163eb7
Anyways, looks like this test wasn't launched in pre-commit on gen12 - it's in the list of unsupported tests.
@intel/dpcpp-devops-reviewers could you help me to figure out if it's true?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, definitely looks like it didn't run. i dont think cpu and gpu will ever both be true, i think we need any-device-is-cpu && any-device-is-gpu

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarnex take a look at this test - https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AddressSanitizer/aot/cpu.cpp
the REQUIRES there is even simpler and it also uses run-aux, but it's also in the list of unsupported tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok yeah good find, let me actually debug it, thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol okay, then I think we can leave the test as is. it should work when the issue with gen12 is fixed.
@intel/dpcpp-sanitizers-review take a look please.

Copy link
Contributor

@AllanZyne AllanZyne May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for correcting the require pattern.
Yep, we haven't fixed the GEN12 issue yet, because it's low priority.
We will take a look at GEN12 in the future.

// RUN: env UR_LAYER_ASAN_OPTIONS="detect_kernel_arguments:1" %{run} not %t 2>&1 | FileCheck --check-prefixes CHECK,CHECK-DEVICE %s

Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/USM/multictxt.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %{build} -o %t1.out
// RUN: %{run-unfiltered-devices} %t1.out
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// REQUIRES: cpu, gpu
// REQUIRES: cpu, any-device-is-gpu

//==----------------- multictxt.cpp - Multi Context USM test ---------------==//
//
Expand Down
Loading