Skip to content

Commit 91664f9

Browse files
test: use dedicated flag for copy offload hint
Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent 8b98e0d commit 91664f9

File tree

6 files changed

+24
-37
lines changed

6 files changed

+24
-37
lines changed

level_zero/core/test/black_box_tests/common/zello_common.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,10 @@ void createImmediateCmdlistWithMode(ze_context_handle_t context,
392392
ze_command_queue_flags_t flags,
393393
ze_command_queue_priority_t priority,
394394
uint32_t ordinal,
395-
bool copyOffload,
396395
ze_command_list_handle_t &cmdList) {
397-
zex_intel_queue_copy_operations_offload_hint_exp_desc_t copyOffloadDesc = {ZEX_INTEL_STRUCTURE_TYPE_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_PROPERTIES};
398-
copyOffloadDesc.copyOffloadEnabled = copyOffload;
399-
400396
ze_command_queue_desc_t cmdQueueDesc{
401397
.stype = ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC,
402-
.pNext = &copyOffloadDesc,
398+
.pNext = nullptr,
403399
.ordinal = ordinal,
404400
.index = 0,
405401
.flags = flags,

level_zero/core/test/black_box_tests/common/zello_common.h

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ void createImmediateCmdlistWithMode(ze_context_handle_t context,
125125
ze_command_queue_flags_t flags,
126126
ze_command_queue_priority_t priority,
127127
uint32_t ordinal,
128-
bool copyOffload,
129128
ze_command_list_handle_t &cmdList);
130129

131130
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
@@ -134,83 +133,75 @@ inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
134133
ze_command_queue_priority_t priority,
135134
uint32_t ordinal,
136135
bool syncMode,
137-
bool copyOffload,
138136
ze_command_list_handle_t &cmdList) {
139137
ze_command_queue_mode_t mode = ZE_COMMAND_QUEUE_MODE_DEFAULT;
140138
selectQueueMode(mode, syncMode);
141-
createImmediateCmdlistWithMode(context, device, mode, flags, priority, ordinal, copyOffload, cmdList);
139+
createImmediateCmdlistWithMode(context, device, mode, flags, priority, ordinal, cmdList);
142140
}
143141

144142
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
145143
ze_device_handle_t device,
146144
ze_command_queue_priority_t priority,
147145
uint32_t ordinal,
148146
bool syncMode,
149-
bool copyOffload,
150147
ze_command_list_handle_t &cmdList) {
151148
constexpr ze_command_queue_flags_t constFlags = 0;
152-
createImmediateCmdlistWithMode(context, device, constFlags, priority, ordinal, syncMode, copyOffload, cmdList);
149+
createImmediateCmdlistWithMode(context, device, constFlags, priority, ordinal, syncMode, cmdList);
153150
}
154151

155152
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
156153
ze_device_handle_t device,
157154
ze_command_queue_flags_t flags,
158155
uint32_t ordinal,
159156
bool syncMode,
160-
bool copyOffload,
161157
ze_command_list_handle_t &cmdList) {
162-
createImmediateCmdlistWithMode(context, device, flags, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ordinal, syncMode, copyOffload, cmdList);
158+
createImmediateCmdlistWithMode(context, device, flags, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ordinal, syncMode, cmdList);
163159
}
164160

165161
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
166162
ze_device_handle_t device,
167163
uint32_t ordinal,
168164
bool syncMode,
169-
bool copyOffload,
170165
ze_command_list_handle_t &cmdList) {
171166
constexpr ze_command_queue_flags_t constFlags = 0;
172-
createImmediateCmdlistWithMode(context, device, constFlags, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ordinal, syncMode, copyOffload, cmdList);
167+
createImmediateCmdlistWithMode(context, device, constFlags, ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ordinal, syncMode, cmdList);
173168
}
174169

175170
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
176171
ze_device_handle_t device,
177172
ze_command_queue_priority_t priority,
178173
bool syncMode,
179174
bool copyEngine,
180-
bool copyOffload,
181175
ze_command_list_handle_t &cmdList) {
182176
uint32_t ordinal = copyEngine ? getCopyOnlyCommandQueueOrdinal(device) : getCommandQueueOrdinal(device, false);
183-
createImmediateCmdlistWithMode(context, device, priority, ordinal, syncMode, copyOffload, cmdList);
177+
createImmediateCmdlistWithMode(context, device, priority, ordinal, syncMode, cmdList);
184178
}
185179

186180
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
187181
ze_device_handle_t device,
188182
ze_command_queue_flags_t flags,
189183
bool syncMode,
190184
bool copyEngine,
191-
bool copyOffload,
192185
ze_command_list_handle_t &cmdList) {
193186
uint32_t ordinal = copyEngine ? getCopyOnlyCommandQueueOrdinal(device) : getCommandQueueOrdinal(device, false);
194-
createImmediateCmdlistWithMode(context, device, flags, ordinal, syncMode, copyOffload, cmdList);
187+
createImmediateCmdlistWithMode(context, device, flags, ordinal, syncMode, cmdList);
195188
}
196189

197190
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
198191
ze_device_handle_t device,
199192
bool syncMode,
200193
bool copyEngine,
201-
bool copyOffload,
202194
ze_command_list_handle_t &cmdList) {
203195
constexpr ze_command_queue_flags_t constFlags = 0;
204-
createImmediateCmdlistWithMode(context, device, constFlags, syncMode, copyEngine, copyOffload, cmdList);
196+
createImmediateCmdlistWithMode(context, device, constFlags, syncMode, copyEngine, cmdList);
205197
}
206198

207199
inline void createImmediateCmdlistWithMode(ze_context_handle_t context,
208200
ze_device_handle_t device,
209201
ze_command_list_handle_t &cmdList) {
210202
constexpr bool syncMode = false;
211203
constexpr bool copyEngine = false;
212-
constexpr bool copyOffload = false;
213-
createImmediateCmdlistWithMode(context, device, syncMode, copyEngine, copyOffload, cmdList);
204+
createImmediateCmdlistWithMode(context, device, syncMode, copyEngine, cmdList);
214205
}
215206

216207
void createEventPoolAndEvents(ze_context_handle_t &context,

level_zero/core/test/black_box_tests/zello_commandlist_immediate.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void testAppendMemoryCopy(ze_context_handle_t &context, ze_device_handle_t &devi
4040

4141
if (sharedCmdList == nullptr) {
4242
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device,
43-
useSyncCmdQ, false, false, cmdList);
43+
useSyncCmdQ, false, cmdList);
4444
} else {
4545
cmdList = sharedCmdList;
4646
}
@@ -106,7 +106,7 @@ void testAppendMemoryCopyRegion(ze_context_handle_t &context, ze_device_handle_t
106106

107107
if (sharedCmdList == nullptr) {
108108
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device,
109-
useSyncCmdQ, false, false, cmdList);
109+
useSyncCmdQ, false, cmdList);
110110
} else {
111111
cmdList = sharedCmdList;
112112
}
@@ -291,7 +291,7 @@ void testAppendGpuKernel(ze_context_handle_t &context, ze_device_handle_t &devic
291291

292292
if (sharedCmdList == nullptr) {
293293
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device,
294-
useSyncCmdQ, false, false, cmdList);
294+
useSyncCmdQ, false, cmdList);
295295
} else {
296296
cmdList = sharedCmdList;
297297
}
@@ -440,7 +440,7 @@ int main(int argc, char *argv[]) {
440440
ze_command_list_handle_t cmdListShared = nullptr;
441441
if (commandListShared) {
442442
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device0,
443-
useSyncQueue, false, false, cmdListShared);
443+
useSyncQueue, false, cmdListShared);
444444
cmdList = cmdListShared;
445445
}
446446

@@ -449,11 +449,11 @@ int main(int argc, char *argv[]) {
449449
ze_command_list_handle_t cmdListLaunchGpuKernel = nullptr;
450450
if (commandListCoexist) {
451451
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device0,
452-
useSyncQueue, false, false, cmdListStandardMemoryCopy);
452+
useSyncQueue, false, cmdListStandardMemoryCopy);
453453
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device0,
454-
useSyncQueue, false, false, cmdListMemoryCopyRegion);
454+
useSyncQueue, false, cmdListMemoryCopyRegion);
455455
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device0,
456-
useSyncQueue, false, false, cmdListLaunchGpuKernel);
456+
useSyncQueue, false, cmdListLaunchGpuKernel);
457457

458458
cmdList = cmdListStandardMemoryCopy;
459459
}

level_zero/core/test/black_box_tests/zello_graph.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,10 @@ bool testExternalGraphCbEvents(GraphApi &graphApi,
673673

674674
ze_command_list_handle_t cmdList;
675675
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, ZE_COMMAND_QUEUE_FLAG_IN_ORDER,
676-
false, false, false, cmdList);
676+
false, false, cmdList);
677677

678678
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, ZE_COMMAND_QUEUE_FLAG_IN_ORDER,
679-
false, false, false, cmdList);
679+
false, false, cmdList);
680680
void *buffer = nullptr;
681681
ze_host_mem_alloc_desc_t hostDesc = {ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC};
682682
SUCCESS_OR_TERMINATE(zeMemAllocHost(context, &hostDesc, allocSize, allocSize, &buffer));
@@ -778,11 +778,11 @@ bool testMultipleLevelGraph(GraphApi &graphApi,
778778

779779
ze_command_list_handle_t cmdListRoot, cmdListFork1, cmdListFork2;
780780
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, ZE_COMMAND_QUEUE_FLAG_IN_ORDER,
781-
false, false, false, cmdListRoot);
781+
false, false, cmdListRoot);
782782
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, ZE_COMMAND_QUEUE_FLAG_IN_ORDER,
783-
false, false, false, cmdListFork1);
783+
false, false, cmdListFork1);
784784
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, ZE_COMMAND_QUEUE_FLAG_IN_ORDER,
785-
false, false, false, cmdListFork2);
785+
false, false, cmdListFork2);
786786

787787
void *srcBuffer = nullptr;
788788
ze_host_mem_alloc_desc_t hostDesc = {ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC};

level_zero/core/test/black_box_tests/zello_immediate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void testCopyBetweenHostMemAndDeviceMem(ze_context_handle_t &context, ze_device_
2525
const bool isEventsUsed = useEventBasedSync && !syncMode;
2626

2727
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device,
28-
copyQueueGroup, syncMode, false, cmdList);
28+
copyQueueGroup, syncMode, cmdList);
2929

3030
ze_host_mem_alloc_desc_t hostDesc = {};
3131
hostDesc.stype = ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC;
@@ -103,7 +103,7 @@ void executeGpuKernelAndValidate(ze_context_handle_t &context, ze_device_handle_
103103
ze_command_list_handle_t cmdList;
104104

105105
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device,
106-
syncMode, false, false, cmdList);
106+
syncMode, false, cmdList);
107107
const auto isEventsUsed = useEventBasedSync && !syncMode;
108108

109109
// Create two shared buffers

level_zero/core/test/black_box_tests/zello_sandbox.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ std::string testEventSyncForMultiTileAndCopy(bool immediate, bool tsEvent) {
559559
void executeMemoryCopyOnSystemMemory(ze_context_handle_t &context, ze_device_handle_t &device,
560560
bool &outputValidationSuccessful, bool aubMode) {
561561
ze_command_list_handle_t cmdList = nullptr;
562-
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, true, false, false, cmdList);
562+
LevelZeroBlackBoxTests::createImmediateCmdlistWithMode(context, device, true, false, cmdList);
563563

564564
constexpr size_t allocSize = 0x1000;
565565
const uint8_t value = 0x55;

0 commit comments

Comments
 (0)