Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit e80a5c1

Browse files
[SYCL][L0] Use compute engine for memory fill command (#1273)
1 parent 47a169f commit e80a5c1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// REQUIRES: gpu, level_zero, level_zero_dev_kit
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
3+
// RUN: env ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
4+
// RUN: env ZE_DEBUG=1 SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_FILL=0 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5+
6+
// Check that the fill operation is using compute (0 ordinal) engine.
7+
//
8+
// CHECK: [getZeQueue]: create queue ordinal = 0
9+
// CHECKL ZE ---> zeCommandListAppendMemoryFill
10+
11+
#include <iostream>
12+
#include <sycl/sycl.hpp>
13+
14+
using namespace sycl;
15+
16+
const int N = 1024;
17+
18+
int main() {
19+
auto Q = queue(gpu_selector_v);
20+
auto p = malloc_device(N, Q);
21+
Q.memset(p, 1, N).wait();
22+
sycl::free(p, Q);
23+
24+
return 0;
25+
}

0 commit comments

Comments
 (0)