12
12
// ===----------------------------------------------------------------------===//
13
13
14
14
// Flaky with CUDA and HIP (https://github.com/intel/llvm/issues/6495).
15
- // TODO: Test is failing for acc backend, enable back when the issue
16
- // fixed.
17
- // UNSUPPORTED: cuda, hip, accelerator
15
+ // UNSUPPORTED: cuda, hip
18
16
19
17
#include < cassert>
18
+ #include < iostream>
20
19
#include < sycl/sycl.hpp>
21
20
22
21
using namespace sycl ;
@@ -41,6 +40,12 @@ bool verifyProfiling(event Event) {
41
40
// The test checks that get_profiling_info waits for command asccociated with
42
41
// event to complete execution.
43
42
int main () {
43
+ device Dev;
44
+ if (!Dev.has (aspect::queue_profiling)) {
45
+ std::cout << " Profiling is not supported, skipping the test" << std::endl;
46
+ return 0 ;
47
+ }
48
+
44
49
const size_t Size = 10000 ;
45
50
int Data[Size] = {0 };
46
51
for (size_t I = 0 ; I < Size; ++I) {
@@ -53,7 +58,7 @@ int main() {
53
58
buffer<int , 1 > BufferTo (Values, range<1 >(Size));
54
59
55
60
// buffer copy
56
- queue copyQueue{sycl::property::queue::enable_profiling ()};
61
+ queue copyQueue{Dev, sycl::property::queue::enable_profiling ()};
57
62
event copyEvent = copyQueue.submit ([&](sycl::handler &Cgh) {
58
63
accessor<int , 1 , access::mode::read, access::target::device> AccessorFrom (
59
64
BufferFrom, Cgh, range<1 >(Size));
@@ -63,7 +68,7 @@ int main() {
63
68
});
64
69
65
70
// kernel launch
66
- queue kernelQueue{sycl::property::queue::enable_profiling ()};
71
+ queue kernelQueue{Dev, sycl::property::queue::enable_profiling ()};
67
72
event kernelEvent = kernelQueue.submit ([&](sycl::handler &CGH) {
68
73
CGH.single_task <class EmptyKernel >([=]() {});
69
74
});
0 commit comments