mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
test: change function to create cb events in black box tests
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7bb2d323d9
commit
218be5b361
@@ -37,6 +37,7 @@ static LoadedDriverExtensions driverExtensions;
|
||||
|
||||
using LoadedDeviceQueueProperties = std::map<ze_device_handle_t, std::vector<ze_command_queue_group_properties_t>>;
|
||||
static LoadedDeviceQueueProperties deviceQueueProperties;
|
||||
static ze_driver_handle_t testDriverHandle;
|
||||
|
||||
std::vector<ze_command_queue_group_properties_t> &getDeviceQueueProperties(ze_device_handle_t device) {
|
||||
auto &queueProperties = deviceQueueProperties[device];
|
||||
@@ -391,7 +392,6 @@ void createEventPoolAndEvents(ze_context_handle_t &context,
|
||||
ze_event_pool_flags_t poolFlag,
|
||||
bool counterEvents,
|
||||
const zex_counter_based_event_desc_t *counterBasedDesc,
|
||||
pfnZexCounterBasedEventCreate2 zexCounterBasedEventCreate2Func,
|
||||
uint32_t poolSize,
|
||||
ze_event_handle_t *events,
|
||||
ze_event_scope_flags_t signalScope,
|
||||
@@ -403,6 +403,8 @@ void createEventPoolAndEvents(ze_context_handle_t &context,
|
||||
|
||||
if (!counterEvents) {
|
||||
SUCCESS_OR_TERMINATE(zeEventPoolCreate(context, &eventPoolDesc, 1, &device, &eventPool));
|
||||
} else {
|
||||
loadCounterBasedEventCreateFunction(testDriverHandle);
|
||||
}
|
||||
|
||||
ze_event_desc_t eventDesc = {ZE_STRUCTURE_TYPE_EVENT_DESC};
|
||||
@@ -468,6 +470,7 @@ std::vector<ze_device_handle_t> zelloInitContextAndGetDevices(ze_context_handle_
|
||||
}
|
||||
|
||||
SUCCESS_OR_TERMINATE(zeInitDrivers(&driverCount, &driverHandle, &desc));
|
||||
testDriverHandle = driverHandle;
|
||||
|
||||
SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zerGetDefaultContext", reinterpret_cast<void **>(&zerGetDefaultContextFunc)));
|
||||
SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zeDeviceSynchronize", reinterpret_cast<void **>(&zeDeviceSynchronizeFunc)));
|
||||
|
||||
@@ -124,7 +124,6 @@ void createEventPoolAndEvents(ze_context_handle_t &context,
|
||||
ze_event_pool_flags_t poolFlag,
|
||||
bool counterEvents,
|
||||
const zex_counter_based_event_desc_t *counterBasedDesc,
|
||||
pfnZexCounterBasedEventCreate2 zexCounterBasedEventCreate2Func,
|
||||
uint32_t poolSize,
|
||||
ze_event_handle_t *events,
|
||||
ze_event_scope_flags_t signalScope,
|
||||
|
||||
@@ -91,7 +91,7 @@ void executeKernelAndValidate(ze_context_handle_t &context, ze_device_handle_t &
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_DEVICE,
|
||||
0);
|
||||
|
||||
@@ -54,12 +54,12 @@ void testAppendMemoryCopy(ze_context_handle_t &context, ze_device_handle_t &devi
|
||||
|
||||
if (!useSyncCmdQ) {
|
||||
if (sharedEvent == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event = sharedEvent;
|
||||
}
|
||||
if (sharedEvent2 == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event2 = sharedEvent2;
|
||||
}
|
||||
@@ -172,12 +172,12 @@ void testAppendMemoryCopyRegion(ze_context_handle_t &context, ze_device_handle_t
|
||||
if (!useSyncCmdQ) {
|
||||
// Create Event Pool and kernel launch event
|
||||
if (sharedEvent == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event = sharedEvent;
|
||||
}
|
||||
if (sharedEvent2 == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event2 = sharedEvent2;
|
||||
}
|
||||
@@ -342,12 +342,12 @@ void testAppendGpuKernel(ze_context_handle_t &context, ze_device_handle_t &devic
|
||||
if (!useSyncCmdQ) {
|
||||
// Create Event Pool and kernel launch event
|
||||
if (sharedEvent == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event = sharedEvent;
|
||||
}
|
||||
if (sharedEvent2 == nullptr) {
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
event2 = sharedEvent2;
|
||||
}
|
||||
@@ -453,8 +453,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (!useSyncQueue && eventPoolShared) {
|
||||
// Create Event Pool and kernel launch event
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device0, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device0, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device0, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device0, eventPool2, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event2, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
}
|
||||
|
||||
ze_command_list_handle_t cmdList = nullptr;
|
||||
|
||||
@@ -59,12 +59,12 @@ bool testEventsDeviceSignalDeviceWait(ze_context_handle_t &context, ze_device_ha
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> deviceEvents(numEvents), hostEvents(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPoolDevice,
|
||||
0, false, nullptr, nullptr,
|
||||
0, false, nullptr,
|
||||
numEvents, deviceEvents.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_SUBDEVICE,
|
||||
0);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPoolHost,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, hostEvents.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
@@ -150,7 +150,7 @@ bool testEventsDeviceSignalHostWait(ze_context_handle_t &context, ze_device_hand
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
@@ -209,7 +209,7 @@ bool testEventsDeviceSignalHostWaitWithNonZeroOrdinal(ze_context_handle_t &conte
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
@@ -270,7 +270,7 @@ bool testEventsHostSignalHostWait(ze_context_handle_t &context, ze_device_handle
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE | ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP,
|
||||
false, nullptr, nullptr,
|
||||
false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
|
||||
@@ -321,7 +321,7 @@ bool testAppendLaunchKernel(GraphApi &graphApi,
|
||||
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device,
|
||||
eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE,
|
||||
false, nullptr, nullptr,
|
||||
false, nullptr,
|
||||
1, &eventCopied, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
ze_command_list_handle_t cmdList;
|
||||
@@ -449,7 +449,7 @@ bool testAppendLaunchMultipleKernelsIndirect(GraphApi &graphApi,
|
||||
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device,
|
||||
eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE,
|
||||
false, nullptr, nullptr,
|
||||
false, nullptr,
|
||||
1, &eventCopied, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
ze_command_list_handle_t cmdList;
|
||||
@@ -683,7 +683,7 @@ bool testExternalGraphCbEvents(GraphApi &graphApi,
|
||||
counterBasedDesc.signalScope = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device,
|
||||
eventPool, 0u,
|
||||
true, &counterBasedDesc, LevelZeroBlackBoxTests::zexCounterBasedEventCreate2Func,
|
||||
true, &counterBasedDesc,
|
||||
1, &eventCb, ZE_EVENT_SCOPE_FLAG_HOST, 0u);
|
||||
|
||||
ze_kernel_handle_t kernelAddConstant = testKernels["add_constant"];
|
||||
@@ -783,7 +783,7 @@ bool testMultipleLevelGraph(GraphApi &graphApi,
|
||||
counterBasedDesc.flags = ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE | ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device,
|
||||
eventPool, 0u,
|
||||
true, &counterBasedDesc, LevelZeroBlackBoxTests::zexCounterBasedEventCreate2Func,
|
||||
true, &counterBasedDesc,
|
||||
1, &eventCb, 0u, 0u);
|
||||
|
||||
ze_kernel_handle_t kernelAddDst = testKernels["add_constant_output"];
|
||||
@@ -1018,7 +1018,6 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
if (testMask.test(bitNumberTestExternalCbEvents)) {
|
||||
LevelZeroBlackBoxTests::loadCounterBasedEventCreateFunction(driverHandle);
|
||||
currentTest = "External Graph CB Events";
|
||||
casePass = testExternalGraphCbEvents(graphApi, context, device0, kernelsMap, aubMode, graphDumpSettings);
|
||||
LevelZeroBlackBoxTests::printResult(aubMode, casePass, blackBoxName, currentTest);
|
||||
@@ -1026,7 +1025,6 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
if (testMask.test(bitNumberTestMultiLevelGraph)) {
|
||||
LevelZeroBlackBoxTests::loadCounterBasedEventCreateFunction(driverHandle);
|
||||
auto testTitle = "Multiple Level Graph";
|
||||
auto getCaseName = [&testTitle](bool immediate) -> std::string {
|
||||
std::ostringstream caseName;
|
||||
|
||||
@@ -40,7 +40,7 @@ void testHostFunction(ze_driver_handle_t &driver, ze_context_handle_t &context,
|
||||
uint32_t numEvents = 6;
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
@@ -64,12 +64,12 @@ void testCopyBetweenHostMemAndDeviceMem(ze_context_handle_t &context, ze_device_
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> deviceEvents(numEvents), hostEvents(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPoolDevice,
|
||||
0, false, nullptr, nullptr,
|
||||
0, false, nullptr,
|
||||
numEvents, deviceEvents.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_SUBDEVICE,
|
||||
0);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPoolHost,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, hostEvents.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
@@ -149,7 +149,7 @@ void executeGpuKernelAndValidate(ze_context_handle_t &context, ze_device_handle_
|
||||
uint32_t numEvents = 2;
|
||||
std::vector<ze_event_handle_t> hostEvents(numEvents);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPoolHost,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr,
|
||||
numEvents, hostEvents.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
0);
|
||||
|
||||
@@ -119,7 +119,7 @@ void executeImmediateAndRegularCommandLists(ze_context_handle_t &context, ze_dev
|
||||
|
||||
ze_event_pool_handle_t eventPool;
|
||||
ze_event_handle_t events[3];
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 3, events, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 3, events, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendMemoryCopy(cmdList, deviceMemory, sourceSystemMemory.data(), regularCmdlistBufSize, events[1], 0, nullptr));
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendMemoryCopy(cmdList, destSystemMemory.data(), deviceMemory, regularCmdlistBufSize, events[2], 1, &events[1]));
|
||||
@@ -212,7 +212,7 @@ void executeMemoryTransferAndValidate(ze_context_handle_t &context, ze_device_ha
|
||||
std::vector<ze_event_handle_t> events(numEvents);
|
||||
ze_event_pool_flags_t eventPoolFlags = flags;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
eventPoolFlags, false, nullptr, nullptr,
|
||||
eventPoolFlags, false, nullptr,
|
||||
numEvents, events.data(),
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
@@ -28,7 +28,7 @@ void executeGpuKernelAndValidate(ze_context_handle_t &context,
|
||||
cmdQueueDesc.index = 0;
|
||||
if (useAsync) {
|
||||
cmdQueueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_HOST_VISIBLE, false, nullptr, 1, &event, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
} else {
|
||||
cmdQueueDesc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ bool testKernelTimestampHostQuery(int argc, char *argv[],
|
||||
|
||||
ze_event_pool_handle_t eventPool;
|
||||
ze_event_handle_t kernelTsEvent;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendLaunchKernel(cmdList, kernel, &dispatchTraits, kernelTsEvent, 0, nullptr));
|
||||
SUCCESS_OR_TERMINATE(zeCommandListClose(cmdList));
|
||||
@@ -336,7 +336,7 @@ bool testKernelTimestampAppendQuery(ze_context_handle_t &context,
|
||||
|
||||
ze_event_pool_handle_t eventPool;
|
||||
ze_event_handle_t kernelTsEvent;
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendLaunchKernel(cmdList, kernel, &dispatchTraits, kernelTsEvent, 0, nullptr));
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendBarrier(cmdList, nullptr, 0u, nullptr));
|
||||
@@ -485,7 +485,7 @@ bool testKernelTimestampMapToHostTimescale(int argc, char *argv[],
|
||||
dispatchTraits.groupCountY = 1u;
|
||||
dispatchTraits.groupCountZ = 1u;
|
||||
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool, ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP, false, nullptr, 1, &kernelTsEvent, ZE_EVENT_SCOPE_FLAG_HOST, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
SUCCESS_OR_TERMINATE(zeCommandListAppendLaunchKernel(cmdList, kernel, &dispatchTraits, kernelTsEvent, 0, nullptr));
|
||||
|
||||
return true;
|
||||
@@ -620,7 +620,7 @@ bool testKernelMappedTimestampMap(int argc, char *argv[],
|
||||
|
||||
ze_event_handle_t kernelTsEvent[maxEventUsageCount];
|
||||
LevelZeroBlackBoxTests::createEventPoolAndEvents(context, device, eventPool,
|
||||
(ZE_EVENT_POOL_FLAG_HOST_VISIBLE | ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP), false, nullptr, nullptr,
|
||||
(ZE_EVENT_POOL_FLAG_HOST_VISIBLE | ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP), false, nullptr,
|
||||
maxEventUsageCount, kernelTsEvent,
|
||||
ZE_EVENT_SCOPE_FLAG_DEVICE, ZE_EVENT_SCOPE_FLAG_HOST);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user