File tree Expand file tree Collapse file tree
sycl/test-e2e/WorkGroupMemory Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // UNSUPPORTED: hip
2- // UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17339
3- // RUN: %{build} -o %t.out
4- // RUN: %{run} %t.out
5- // XFAIL: spirv-backend
6- // XFAIL-TRACKER: https://github.com/intel/llvm/issues/18230
1+ // Shared implementation for the work-group memory basic usage tests.
2+
3+ #pragma once
74
85#include < sycl/builtins.hpp>
96#include < sycl/detail/core.hpp>
107#include < sycl/ext/oneapi/experimental/work_group_memory.hpp>
118#include < sycl/group_barrier.hpp>
129#include < sycl/half_type.hpp>
10+ #include < sycl/queue.hpp>
1311
1412#include < cassert>
1513#include < cstring>
1614
1715namespace syclexp = sycl::ext::oneapi::experimental;
1816
19- sycl::queue q;
20-
2117// This test performs a swap of two scalars/arrays inside a kernel using a
2218// work_group_memory object as a temporary buffer. The test is done for scalar
2319// types and bounded arrays. After the kernel finishes, it is verified on the
@@ -407,19 +403,3 @@ template <typename T> void test_ptr() {
407403 }
408404 swap_array_2d (arr1, arr2, 8 );
409405}
410-
411- int main () {
412- test<int >();
413- test<char >();
414- test<uint16_t >();
415- if (q.get_device ().has (sycl::aspect::fp16))
416- test<sycl::half>();
417- test_ptr<float *>();
418- test_ptr<int *>();
419- test_ptr<char *>();
420- test_ptr<uint16_t *>();
421- if (q.get_device ().has (sycl::aspect::fp16))
422- test_ptr<sycl::half *>();
423- test_ptr<float *>();
424- return 0 ;
425- }
Original file line number Diff line number Diff line change 1+ // Non-pointer types version of the basic usage test.
2+
3+ // UNSUPPORTED: hip
4+ // UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17339
5+
6+ // XFAIL: spirv-backend
7+ // XFAIL-TRACKER: https://github.com/intel/llvm/issues/18230
8+
9+ // RUN: %{build} -o %t.out
10+ // RUN: %{run} %t.out
11+
12+ #include < sycl/queue.hpp>
13+
14+ sycl::queue q;
15+
16+ #include " ./basic_usage_common.hpp"
17+
18+ int main () {
19+ test<float >();
20+ test<int >();
21+ test<char >();
22+ test<uint16_t >();
23+ if (q.get_device ().has (sycl::aspect::fp16))
24+ test<sycl::half>();
25+ return 0 ;
26+ }
Original file line number Diff line number Diff line change 1+ // Pointer-types version of the basic usage test.
2+
3+ // UNSUPPORTED: hip
4+ // UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17339
5+
6+ // XFAIL: spirv-backend
7+ // XFAIL-TRACKER: https://github.com/intel/llvm/issues/18230
8+
9+ // RUN: %{build} -o %t.out
10+ // RUN: %{run} %t.out
11+
12+ #include < sycl/queue.hpp>
13+
14+ sycl::queue q;
15+
16+ #include " ./basic_usage_common.hpp"
17+
18+ int main () {
19+ test_ptr<float *>();
20+ test_ptr<int *>();
21+ test_ptr<char *>();
22+ test_ptr<uint16_t *>();
23+ if (q.get_device ().has (sycl::aspect::fp16))
24+ test_ptr<sycl::half *>();
25+ return 0 ;
26+ }
You can’t perform that action at this time.
0 commit comments