This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ==---------------- preemption.cpp - DPC++ ESIMD on-device test ----------==//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ // REQUIRES: gpu && linux
9
+ // UNSUPPORTED: cuda || hip
10
+ // TODO: remove XFAIL once GPU RT starts using "enablePreemption" by default.
11
+ // XFAIL: *
12
+ // RUN: %clangxx -fsycl %s -o %t.out
13
+ // RUN: %GPU_RUN_PLACEHOLDER IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 %t.out
14
+ // RUN: grep enablePreemption %t.dump/*.asm
15
+
16
+ // The test expects to see "enablePreemption" switch in the compilation
17
+ // switches. It fails if does not find it.
18
+
19
+ #include " esimd_test_utils.hpp"
20
+
21
+ #include < CL/sycl.hpp>
22
+ #include < iostream>
23
+ #include < sycl/ext/intel/experimental/esimd.hpp>
24
+
25
+ using namespace cl ::sycl;
26
+
27
+ int main () {
28
+ queue q;
29
+ q.submit ([&](handler &cgh) {
30
+ cgh.parallel_for <class Test >(sycl::range<1 >{1 },
31
+ [=](id<1 > id) SYCL_ESIMD_KERNEL {});
32
+ });
33
+ return 0 ;
34
+ }
You can’t perform that action at this time.
0 commit comments