Skip to content

Commit

Permalink
[SYCL] Add more aspects to CPU AOT target (#15263)
Browse files Browse the repository at this point in the history
Also enable non-uniform group tests for CPU JIT and AOT.
  • Loading branch information
Nuullll authored Sep 4, 2024
1 parent 3d07790 commit cba44cd
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 9 deletions.
10 changes: 9 additions & 1 deletion llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,17 @@ def : TargetInfo<"__TestDeprecatedAspectList",
AspectUsm_restricted_shared_allocations, AspectHost],
[]>;

defvar IntelCpuAspects = [
AspectCpu, AspectFp16, AspectFp64, AspectQueue_profiling, AspectAtomic64,
AspectExt_oneapi_srgb, AspectExt_oneapi_native_assert,
AspectExt_intel_legacy_image, AspectExt_oneapi_ballot_group,
AspectExt_oneapi_fixed_size_group, AspectExt_oneapi_opportunistic_group,
AspectExt_oneapi_tangle_group, AspectExt_oneapi_private_alloca
] # AllUSMAspects;

def : TargetInfo<"spir64", [], [], "", "", 1>;
def : TargetInfo<"spir64_gen", [], [], "", "", 1>;
def : TargetInfo<"spir64_x86_64", [AspectFp16, AspectFp64, AspectAtomic64, AspectExt_oneapi_ballot_group], [4, 8, 16, 32, 64], "", "", 1>;
def : TargetInfo<"spir64_x86_64", IntelCpuAspects, [4, 8, 16, 32, 64], "", "", 1>;
def : TargetInfo<"spir64_fpga", [], [], "", "", 1>;
def : TargetInfo<"x86_64", [], [], "", "", 1>;
// Examples of how to use a combination of explicitly specified values + predefined lists
Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/NonUniformGroups/ballot_group.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip

#include <sycl/detail/core.hpp>
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_ballot_group
Expand Down
7 changes: 5 additions & 2 deletions sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// REQUIRES: gpu
//
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip
// REQUIRES: sg-32

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_fixed_size_group

Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip

#include <sycl/detail/core.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_opportunistic_group

Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/NonUniformGroups/tangle_group.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -fno-sycl-early-optimizations -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// UNSUPPORTED: cuda || hip

#include <sycl/detail/core.hpp>
Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -fno-sycl-early-optimizations -o %t.out
// RUN: %{run} %t.out
//
// REQUIRES: gpu
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_tangle_group
// UNSUPPORTED: cuda || windows
Expand Down

0 comments on commit cba44cd

Please sign in to comment.