Skip to content

Commit b9eb520

Browse files
authored
[SYCL][Graph] Reenable L0 interop test on PVC (#15493)
Re-enable the interop-level-zero-launch-kernel.cpp E2E test on PVC by making the following correctness changes to the native L0 code: * Both `zeKernelSetGroupSize` and `ZeGroupCount` were set to have 1024 in the X dimensions when this is the total size of the USM allocation, and therefore the number of work items we want. Updated to use `zeKernelSuggestGroupSize` to work calculate the correct group sizes and count. * Update `zeKernelSetArgumentValue` call so that the size parameter is the size of the pointer rather than size of the USM allocation.
1 parent 7b34aee commit b9eb520

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

sycl/test-e2e/Graph/Explicit/interop-level-zero-launch-kernel.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// Extra run to check for immediate-command-list in Level Zero
1010
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{l0_leak_check} %{run} %t.out %S/../Inputs/Kernels/saxpy.spv 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
1111

12-
// https://github.com/intel/llvm/issues/14826
13-
// XFAIL: arch-intel_gpu_pvc
14-
1512
#define GRAPH_E2E_EXPLICIT
1613

1714
#include "../Inputs/interop-level-zero-launch-kernel.cpp"

sycl/test-e2e/Graph/Inputs/interop-level-zero-launch-kernel.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,26 @@ int main(int, char **argv) {
115115
ZeContext, ZeDevice, &ZeCommandQueueDesc, &ZeCommandList);
116116
assert(status == ZE_RESULT_SUCCESS);
117117

118-
status = zeKernelSetArgumentValue(ZeKernel, 0,
119-
Size * sizeof(uint32_t), &MemZ);
118+
status = zeKernelSetArgumentValue(ZeKernel, 0, sizeof(MemZ), &MemZ);
120119
assert(status == ZE_RESULT_SUCCESS);
121-
status = zeKernelSetArgumentValue(ZeKernel, 1,
122-
Size * sizeof(uint32_t), &MemX);
120+
status = zeKernelSetArgumentValue(ZeKernel, 1, sizeof(MemX), &MemX);
123121
assert(status == ZE_RESULT_SUCCESS);
124-
ze_group_count_t ZeGroupCount{Size, 1, 1};
125122

126-
zeKernelSetGroupSize(ZeKernel, 1024, 1, 1);
123+
uint32_t GroupSizeX = 32;
124+
uint32_t GroupSizeY = 1;
125+
uint32_t GroupSizeZ = 1;
126+
status = zeKernelSuggestGroupSize(ZeKernel, Size, 1, 1, &GroupSizeX,
127+
&GroupSizeY, &GroupSizeZ);
127128
assert(status == ZE_RESULT_SUCCESS);
128129

130+
status = zeKernelSetGroupSize(ZeKernel, GroupSizeX, GroupSizeY,
131+
GroupSizeZ);
132+
assert(status == ZE_RESULT_SUCCESS);
133+
134+
ze_group_count_t ZeGroupCount{
135+
static_cast<uint32_t>(Size) / GroupSizeX, 1, 1};
129136
status = zeCommandListAppendLaunchKernel(
130137
ZeCommandList, ZeKernel, &ZeGroupCount, nullptr, 0, nullptr);
131-
132138
assert(status == ZE_RESULT_SUCCESS);
133139

134140
status = zeCommandListHostSynchronize(ZeCommandList, 0);

sycl/test-e2e/Graph/RecordReplay/interop-level-zero-launch-kernel.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// Extra run to check for immediate-command-list in Level Zero
1010
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{l0_leak_check} %{run} %t.out %S/../Inputs/Kernels/saxpy.spv 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
1111

12-
// https://github.com/intel/llvm/issues/14826
13-
// XFAIL: arch-intel_gpu_pvc
14-
1512
#define GRAPH_E2E_RECORD_REPLAY
1613

1714
#include "../Inputs/interop-level-zero-launch-kernel.cpp"

0 commit comments

Comments
 (0)