mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add engine type to commandList
Change-Id: I108fc027dd4698ebecb224c20b92f2b741698f3c
This commit is contained in:
committed by
sys_ocldev
parent
76a9ccc095
commit
877a781696
@@ -106,7 +106,7 @@ void CommandList::eraseResidencyContainerEntry(NEO::GraphicsAllocation *allocati
|
||||
}
|
||||
|
||||
bool CommandList::isCopyOnly() const {
|
||||
return isCopyOnlyCmdList;
|
||||
return NEO::EngineGroupType::Copy == engineGroupType;
|
||||
}
|
||||
|
||||
NEO::PreemptionMode CommandList::obtainFunctionPreemptionMode(Kernel *kernel) {
|
||||
|
||||
@@ -128,11 +128,11 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
virtual ze_result_t appendMINoop() = 0;
|
||||
virtual ze_result_t appendPipeControl(void *dstPtr, uint64_t value) = 0;
|
||||
|
||||
static CommandList *create(uint32_t productFamily, Device *device, bool isCopyOnly,
|
||||
static CommandList *create(uint32_t productFamily, Device *device, NEO::EngineGroupType engineGroupType,
|
||||
ze_result_t &resultValue);
|
||||
static CommandList *createImmediate(uint32_t productFamily, Device *device,
|
||||
const ze_command_queue_desc_t *desc,
|
||||
bool internalUsage, bool isCopyOnly,
|
||||
bool internalUsage, NEO::EngineGroupType engineGroupType,
|
||||
ze_result_t &resultValue);
|
||||
|
||||
static CommandList *fromHandle(ze_command_list_handle_t handle) {
|
||||
@@ -181,7 +181,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
std::vector<Kernel *> printfFunctionContainer;
|
||||
|
||||
virtual ze_result_t executeCommandListImmediate(bool performMigration) = 0;
|
||||
virtual ze_result_t initialize(Device *device, bool isCopyOnly) = 0;
|
||||
virtual ze_result_t initialize(Device *device, NEO::EngineGroupType engineGroupType) = 0;
|
||||
virtual ~CommandList();
|
||||
NEO::CommandContainer commandContainer;
|
||||
|
||||
@@ -189,7 +189,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
std::map<const void *, NEO::GraphicsAllocation *> hostPtrMap;
|
||||
uint32_t commandListPerThreadScratchSize = 0u;
|
||||
NEO::PreemptionMode commandListPreemptionMode = NEO::PreemptionMode::Initial;
|
||||
bool isCopyOnlyCmdList = false;
|
||||
NEO::EngineGroupType engineGroupType;
|
||||
UnifiedMemoryControls unifiedMemoryControls;
|
||||
bool indirectAllocationsAllowed = false;
|
||||
NEO::GraphicsAllocation *getAllocationFromHostPtrMap(const void *buffer, uint64_t bufferSize);
|
||||
|
||||
@@ -35,8 +35,7 @@ struct CommandListCoreFamily : CommandListImp {
|
||||
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;
|
||||
|
||||
using CommandListImp::CommandListImp;
|
||||
|
||||
ze_result_t initialize(Device *device, bool isCopyOnly) override;
|
||||
ze_result_t initialize(Device *device, NEO::EngineGroupType engineGroupType) override;
|
||||
virtual void programL3(bool isSLMused);
|
||||
|
||||
ze_result_t close() override;
|
||||
|
||||
@@ -53,16 +53,16 @@ inline ze_result_t parseErrorCode(NEO::ErrorCode returnValue) {
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, bool isCopyOnly) {
|
||||
ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO::EngineGroupType engineGroupType) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
this->device = device;
|
||||
this->commandListPreemptionMode = device->getDevicePreemptionMode();
|
||||
this->isCopyOnlyCmdList = isCopyOnly;
|
||||
this->engineGroupType = engineGroupType;
|
||||
|
||||
auto returnValue = commandContainer.initialize(static_cast<DeviceImp *>(device)->neoDevice);
|
||||
ze_result_t returnType = parseErrorCode(returnValue);
|
||||
if (returnType == ZE_RESULT_SUCCESS) {
|
||||
if (!isCopyOnly) {
|
||||
if (!isCopyOnly()) {
|
||||
programStateBaseAddress(commandContainer);
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBarrier(ze_event_handle_
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(*commandContainer.getCommandStream(), 0, 0, false, false);
|
||||
} else {
|
||||
NEO::PipeControlArgs args;
|
||||
@@ -292,7 +292,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyFromMemory(ze_i
|
||||
auto slicePitch =
|
||||
image->getImageInfo().imgDesc.imageType == NEO::ImageType::Image1DArray ? 1 : pDstRegion->height * rowPitch;
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
return appendCopyImageBlit(allocationStruct.alloc, image->getAllocation(),
|
||||
{0, 0, 0}, {pDstRegion->originX, pDstRegion->originY, pDstRegion->originZ}, rowPitch, slicePitch,
|
||||
rowPitch, slicePitch, bytesPerPixel, {pDstRegion->width, pDstRegion->height, pDstRegion->depth}, {pDstRegion->width, pDstRegion->height, pDstRegion->depth}, imgSize, hEvent);
|
||||
@@ -408,7 +408,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyToMemory(void *
|
||||
auto slicePitch =
|
||||
(image->getImageInfo().imgDesc.imageType == NEO::ImageType::Image1DArray ? 1 : pSrcRegion->height) * rowPitch;
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
return appendCopyImageBlit(image->getAllocation(), allocationStruct.alloc,
|
||||
{pSrcRegion->originX, pSrcRegion->originY, pSrcRegion->originZ}, {0, 0, 0}, rowPitch, slicePitch,
|
||||
rowPitch, slicePitch, bytesPerPixel, {pSrcRegion->width, pSrcRegion->height, pSrcRegion->depth}, imgSize, {pSrcRegion->width, pSrcRegion->height, pSrcRegion->depth}, hEvent);
|
||||
@@ -538,7 +538,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyRegion(ze_image
|
||||
uint32_t groupSizeY = srcRegion.height;
|
||||
uint32_t groupSizeZ = srcRegion.depth;
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
auto bytesPerPixel = static_cast<uint32_t>(srcImage->getImageInfo().surfaceFormat->ImageElementSizeInBytes);
|
||||
|
||||
Vec3<uint32_t> srcImgSize = {static_cast<uint32_t>(srcImage->getImageInfo().imgDesc.imageWidth),
|
||||
@@ -818,48 +818,48 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
||||
|
||||
appendEventForProfiling(hSignalEvent, true);
|
||||
if (ret == ZE_RESULT_SUCCESS && leftSize) {
|
||||
ret = isCopyOnlyCmdList ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset, static_cast<uint32_t>(leftSize), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(leftSize), 1,
|
||||
Builtin::CopyBufferToBufferSide);
|
||||
ret = isCopyOnly() ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset, static_cast<uint32_t>(leftSize), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(leftSize), 1,
|
||||
Builtin::CopyBufferToBufferSide);
|
||||
}
|
||||
|
||||
if (ret == ZE_RESULT_SUCCESS && middleSizeBytes) {
|
||||
ret = isCopyOnlyCmdList ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, leftSize + dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, leftSize + srcAllocationStruct.offset, static_cast<uint32_t>(middleSizeBytes), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, leftSize + dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, leftSize + srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(middleSizeBytes),
|
||||
static_cast<uint32_t>(middleElSize),
|
||||
Builtin::CopyBufferToBufferMiddle);
|
||||
ret = isCopyOnly() ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, leftSize + dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, leftSize + srcAllocationStruct.offset, static_cast<uint32_t>(middleSizeBytes), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, leftSize + dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, leftSize + srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(middleSizeBytes),
|
||||
static_cast<uint32_t>(middleElSize),
|
||||
Builtin::CopyBufferToBufferMiddle);
|
||||
}
|
||||
|
||||
if (ret == ZE_RESULT_SUCCESS && rightSize) {
|
||||
ret = isCopyOnlyCmdList ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, leftSize + middleSizeBytes + dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, leftSize + middleSizeBytes + srcAllocationStruct.offset, static_cast<uint32_t>(rightSize), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, leftSize + middleSizeBytes + dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, leftSize + middleSizeBytes + srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(rightSize), 1u,
|
||||
Builtin::CopyBufferToBufferSide);
|
||||
ret = isCopyOnly() ? appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, leftSize + middleSizeBytes + dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, leftSize + middleSizeBytes + srcAllocationStruct.offset, static_cast<uint32_t>(rightSize), hSignalEvent)
|
||||
: appendMemoryCopyKernelWithGA(reinterpret_cast<void *>(&dstAllocationStruct.alignedAllocationPtr),
|
||||
dstAllocationStruct.alloc, leftSize + middleSizeBytes + dstAllocationStruct.offset,
|
||||
reinterpret_cast<void *>(&srcAllocationStruct.alignedAllocationPtr),
|
||||
srcAllocationStruct.alloc, leftSize + middleSizeBytes + srcAllocationStruct.offset,
|
||||
static_cast<uint32_t>(rightSize), 1u,
|
||||
Builtin::CopyBufferToBufferSide);
|
||||
}
|
||||
|
||||
this->appendSignalEventPostWalker(hSignalEvent);
|
||||
|
||||
if (dstAllocationStruct.needsFlush && !isCopyOnlyCmdList) {
|
||||
if (dstAllocationStruct.needsFlush && !isCopyOnly()) {
|
||||
NEO::PipeControlArgs args(true);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(), args);
|
||||
}
|
||||
@@ -908,24 +908,24 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyRegion(void *d
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
if (srcRegion->depth > 1) {
|
||||
result = isCopyOnlyCmdList ? appendMemoryCopyBlitRegion(srcAllocationStruct.alloc, dstAllocationStruct.alloc, *srcRegion, *dstRegion, {srcRegion->width, srcRegion->height, srcRegion->depth},
|
||||
srcPitch, srcSlicePitch, dstPitch, dstSlicePitch, srcSize3, dstSize3, hSignalEvent)
|
||||
: this->appendMemoryCopyKernel3d(dstAllocationStruct.alloc, srcAllocationStruct.alloc,
|
||||
Builtin::CopyBufferRectBytes3d, dstRegion, dstPitch, dstSlicePitch, dstAllocationStruct.offset,
|
||||
srcRegion, srcPitch, srcSlicePitch, srcAllocationStruct.offset, hSignalEvent, 0, nullptr);
|
||||
result = isCopyOnly() ? appendMemoryCopyBlitRegion(srcAllocationStruct.alloc, dstAllocationStruct.alloc, *srcRegion, *dstRegion, {srcRegion->width, srcRegion->height, srcRegion->depth},
|
||||
srcPitch, srcSlicePitch, dstPitch, dstSlicePitch, srcSize3, dstSize3, hSignalEvent)
|
||||
: this->appendMemoryCopyKernel3d(dstAllocationStruct.alloc, srcAllocationStruct.alloc,
|
||||
Builtin::CopyBufferRectBytes3d, dstRegion, dstPitch, dstSlicePitch, dstAllocationStruct.offset,
|
||||
srcRegion, srcPitch, srcSlicePitch, srcAllocationStruct.offset, hSignalEvent, 0, nullptr);
|
||||
} else {
|
||||
result = isCopyOnlyCmdList ? appendMemoryCopyBlitRegion(srcAllocationStruct.alloc, dstAllocationStruct.alloc, *srcRegion, *dstRegion, {srcRegion->width, srcRegion->height, srcRegion->depth},
|
||||
srcPitch, srcSlicePitch, dstPitch, dstSlicePitch, srcSize3, dstSize3, hSignalEvent)
|
||||
: this->appendMemoryCopyKernel2d(dstAllocationStruct.alloc, srcAllocationStruct.alloc,
|
||||
Builtin::CopyBufferRectBytes2d, dstRegion, dstPitch, dstAllocationStruct.offset,
|
||||
srcRegion, srcPitch, srcAllocationStruct.offset, hSignalEvent, 0, nullptr);
|
||||
result = isCopyOnly() ? appendMemoryCopyBlitRegion(srcAllocationStruct.alloc, dstAllocationStruct.alloc, *srcRegion, *dstRegion, {srcRegion->width, srcRegion->height, srcRegion->depth},
|
||||
srcPitch, srcSlicePitch, dstPitch, dstSlicePitch, srcSize3, dstSize3, hSignalEvent)
|
||||
: this->appendMemoryCopyKernel2d(dstAllocationStruct.alloc, srcAllocationStruct.alloc,
|
||||
Builtin::CopyBufferRectBytes2d, dstRegion, dstPitch, dstAllocationStruct.offset,
|
||||
srcRegion, srcPitch, srcAllocationStruct.offset, hSignalEvent, 0, nullptr);
|
||||
}
|
||||
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (dstAllocationStruct.needsFlush && !isCopyOnlyCmdList) {
|
||||
if (dstAllocationStruct.needsFlush && !isCopyOnly()) {
|
||||
NEO::PipeControlArgs args(true);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(), args);
|
||||
}
|
||||
@@ -1071,7 +1071,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
|
||||
size_t size,
|
||||
ze_event_handle_t hEvent) {
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
return appendBlitFill(ptr, pattern, patternSize, size, hEvent);
|
||||
}
|
||||
|
||||
@@ -1341,7 +1341,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendSignalEvent(ze_event_han
|
||||
eventSignalOffset = offsetof(KernelTimestampEvent, contextEnd);
|
||||
}
|
||||
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(*commandContainer.getCommandStream(), ptrOffset(baseAddr, eventSignalOffset), Event::STATE_SIGNALED, false, true);
|
||||
} else {
|
||||
NEO::PipeControlArgs args;
|
||||
@@ -1382,7 +1382,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWaitOnEvents(uint32_t nu
|
||||
|
||||
bool dcFlushEnable = (!event->waitScope) ? false : true;
|
||||
if (dcFlushEnable) {
|
||||
if (isCopyOnlyCmdList) {
|
||||
if (isCopyOnly()) {
|
||||
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(*commandContainer.getCommandStream(), 0, 0, false, false);
|
||||
} else {
|
||||
NEO::PipeControlArgs args(true);
|
||||
|
||||
@@ -49,8 +49,7 @@ ze_result_t CommandListImp::appendMetricQueryEnd(zet_metric_query_handle_t hMetr
|
||||
return MetricQuery::fromHandle(hMetricQuery)->appendEnd(*this, hSignalEvent, numWaitEvents, phWaitEvents);
|
||||
}
|
||||
|
||||
CommandList *CommandList::create(uint32_t productFamily, Device *device, bool isCopyOnly,
|
||||
ze_result_t &returnValue) {
|
||||
CommandList *CommandList::create(uint32_t productFamily, Device *device, NEO::EngineGroupType engineGroupType, ze_result_t &returnValue) {
|
||||
CommandListAllocatorFn allocator = nullptr;
|
||||
if (productFamily < IGFX_MAX_PRODUCT) {
|
||||
allocator = commandListFactory[productFamily];
|
||||
@@ -61,7 +60,7 @@ CommandList *CommandList::create(uint32_t productFamily, Device *device, bool is
|
||||
|
||||
if (allocator) {
|
||||
commandList = static_cast<CommandListImp *>((*allocator)(CommandList::defaultNumIddsPerBlock));
|
||||
returnValue = commandList->initialize(device, isCopyOnly);
|
||||
returnValue = commandList->initialize(device, engineGroupType);
|
||||
if (returnValue != ZE_RESULT_SUCCESS) {
|
||||
commandList->destroy();
|
||||
commandList = nullptr;
|
||||
@@ -72,7 +71,7 @@ CommandList *CommandList::create(uint32_t productFamily, Device *device, bool is
|
||||
|
||||
CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device,
|
||||
const ze_command_queue_desc_t *desc,
|
||||
bool internalUsage, bool isCopyOnly,
|
||||
bool internalUsage, NEO::EngineGroupType engineGroupType,
|
||||
ze_result_t &returnValue) {
|
||||
|
||||
CommandListAllocatorFn allocator = nullptr;
|
||||
@@ -85,7 +84,7 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
|
||||
|
||||
if (allocator) {
|
||||
commandList = static_cast<CommandListImp *>((*allocator)(CommandList::commandListimmediateIddsPerBlock));
|
||||
returnValue = commandList->initialize(device, isCopyOnly);
|
||||
returnValue = commandList->initialize(device, engineGroupType);
|
||||
if (returnValue != ZE_RESULT_SUCCESS) {
|
||||
commandList->destroy();
|
||||
commandList = nullptr;
|
||||
@@ -102,7 +101,7 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
|
||||
|
||||
UNRECOVERABLE_IF(nullptr == csr);
|
||||
|
||||
auto commandQueue = CommandQueue::create(productFamily, device, csr, desc, isCopyOnly);
|
||||
auto commandQueue = CommandQueue::create(productFamily, device, csr, desc, NEO::EngineGroupType::Copy == engineGroupType);
|
||||
if (!commandQueue) {
|
||||
commandList->destroy();
|
||||
commandList = nullptr;
|
||||
|
||||
@@ -85,9 +85,8 @@ ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc,
|
||||
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
|
||||
uint32_t engineGroupIndex = desc->commandQueueGroupOrdinal;
|
||||
mapOrdinalForAvailableEngineGroup(&engineGroupIndex);
|
||||
bool useBliter = engineGroupIndex == static_cast<uint32_t>(NEO::EngineGroupType::Copy);
|
||||
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
||||
*commandList = CommandList::create(productFamily, this, useBliter, returnValue);
|
||||
*commandList = CommandList::create(productFamily, this, static_cast<NEO::EngineGroupType>(engineGroupIndex), returnValue);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
@@ -97,9 +96,8 @@ ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t
|
||||
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
|
||||
uint32_t engineGroupIndex = desc->ordinal;
|
||||
mapOrdinalForAvailableEngineGroup(&engineGroupIndex);
|
||||
bool useBliter = engineGroupIndex == static_cast<uint32_t>(NEO::EngineGroupType::Copy);
|
||||
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
||||
*phCommandList = CommandList::createImmediate(productFamily, this, desc, false, useBliter, returnValue);
|
||||
*phCommandList = CommandList::createImmediate(productFamily, this, desc, false, static_cast<NEO::EngineGroupType>(engineGroupIndex), returnValue);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
@@ -111,7 +109,6 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
|
||||
NEO::CommandStreamReceiver *csr = nullptr;
|
||||
uint32_t engineGroupIndex = desc->ordinal;
|
||||
mapOrdinalForAvailableEngineGroup(&engineGroupIndex);
|
||||
bool useBliter = engineGroupIndex == static_cast<uint32_t>(NEO::EngineGroupType::Copy);
|
||||
auto ret = getCsrForOrdinalAndIndex(&csr, desc->ordinal, desc->index);
|
||||
if (ret != ZE_RESULT_SUCCESS) {
|
||||
return ret;
|
||||
@@ -119,7 +116,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
|
||||
|
||||
UNRECOVERABLE_IF(csr == nullptr);
|
||||
|
||||
*commandQueue = CommandQueue::create(productFamily, this, csr, desc, useBliter);
|
||||
*commandQueue = CommandQueue::create(productFamily, this, csr, desc, NEO::EngineGroupType::Copy == static_cast<NEO::EngineGroupType>(engineGroupIndex));
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
@@ -620,7 +617,7 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, uint3
|
||||
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
||||
device->pageFaultCommandList =
|
||||
CommandList::createImmediate(
|
||||
device->neoDevice->getHardwareInfo().platform.eProductFamily, device, &cmdQueueDesc, true, false, returnValue);
|
||||
device->neoDevice->getHardwareInfo().platform.eProductFamily, device, &cmdQueueDesc, true, NEO::EngineGroupType::RenderCompute, returnValue);
|
||||
}
|
||||
|
||||
if (device->getSourceLevelDebugger()) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class CommandListFixture : public DeviceFixture {
|
||||
void SetUp() override {
|
||||
DeviceFixture::SetUp();
|
||||
ze_result_t returnValue;
|
||||
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, false, returnValue)));
|
||||
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)));
|
||||
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
|
||||
|
||||
@@ -53,7 +53,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
|
||||
ASSERT_NE(nullptr, commandQueue->commandStream);
|
||||
|
||||
ze_result_t returnValue;
|
||||
commandList = CommandList::create(productFamily, device, false, returnValue);
|
||||
commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue);
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
}
|
||||
void TearDown() override {
|
||||
|
||||
@@ -23,7 +23,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenKernelWithSLMThenL3IsProgrammedWit
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
createKernel();
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
EXPECT_LE(0u, kernel->kernelImmData->getDescriptor().kernelAttributes.slmInlineSize);
|
||||
|
||||
@@ -55,7 +55,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
|
||||
ASSERT_NE(nullptr, commandQueue->commandStream);
|
||||
|
||||
ze_result_t returnValue;
|
||||
commandList = CommandList::create(productFamily, device, false, returnValue);
|
||||
commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue);
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
}
|
||||
void TearDown() override {
|
||||
@@ -201,8 +201,9 @@ HWTEST2_F(CommandQueueGroupMultiDevice,
|
||||
device,
|
||||
&desc,
|
||||
false,
|
||||
false,
|
||||
NEO::EngineGroupType::RenderCompute,
|
||||
returnValue));
|
||||
|
||||
L0::CommandQueueImp *cmdQueue = reinterpret_cast<CommandQueueImp *>(commandList0->cmdQImmediate);
|
||||
L0::DeviceImp *deviceImp = reinterpret_cast<L0::DeviceImp *>(device);
|
||||
auto expectedCSR = deviceImp->neoDevice->getDeviceById(0)->getEngineGroups()[queueGroupOrdinal][queueGroupIndex].commandStreamReceiver;
|
||||
|
||||
@@ -308,7 +308,7 @@ struct MockCommandList : public CommandList {
|
||||
|
||||
ADDMETHOD_NOBASE(initialize, ze_result_t, ZE_RESULT_SUCCESS,
|
||||
(L0::Device * device,
|
||||
bool onlyCopyBlit));
|
||||
NEO::EngineGroupType engineGroupType));
|
||||
|
||||
uint8_t *batchBuffer = nullptr;
|
||||
NEO::GraphicsAllocation *mockAllocation = nullptr;
|
||||
|
||||
@@ -64,7 +64,7 @@ TEST(zeCommandListCreateImmediate, DISABLED_redirectsToObject) {
|
||||
|
||||
TEST_F(CommandListCreate, whenCommandListIsCreatediWithInvalidProductFamilyThenFailureIsReturned) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(PRODUCT_FAMILY::IGFX_MAX_PRODUCT, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(PRODUCT_FAMILY::IGFX_MAX_PRODUCT, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNINITIALIZED, returnValue);
|
||||
ASSERT_EQ(nullptr, commandList);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ TEST_F(CommandListCreate, whenCommandListImmediateIsCreatediWithInvalidProductFa
|
||||
device,
|
||||
&desc,
|
||||
internalEngine,
|
||||
false,
|
||||
NEO::EngineGroupType::RenderCompute,
|
||||
returnValue));
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNINITIALIZED, returnValue);
|
||||
ASSERT_EQ(nullptr, commandList);
|
||||
@@ -85,7 +85,7 @@ TEST_F(CommandListCreate, whenCommandListImmediateIsCreatediWithInvalidProductFa
|
||||
|
||||
TEST_F(CommandListCreate, whenCommandListIsCreatedThenItIsInitialized) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(device, commandList->device);
|
||||
@@ -111,7 +111,7 @@ TEST_F(CommandListCreate, whenCommandListIsCreatedThenItIsInitialized) {
|
||||
|
||||
TEST_F(CommandListCreate, givenRegularCommandListThenDefaultNumIddPerBlockIsUsed) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
const uint32_t defaultNumIdds = CommandList::defaultNumIddsPerBlock;
|
||||
@@ -120,7 +120,7 @@ TEST_F(CommandListCreate, givenRegularCommandListThenDefaultNumIddPerBlockIsUsed
|
||||
|
||||
TEST_F(CommandListCreate, givenNonExistingPtrThenAppendMemAdviseReturnsError) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
auto res = commandList->appendMemAdvise(device, nullptr, 0, ZE_MEMORY_ADVICE_SET_READ_MOSTLY);
|
||||
@@ -129,7 +129,7 @@ TEST_F(CommandListCreate, givenNonExistingPtrThenAppendMemAdviseReturnsError) {
|
||||
|
||||
TEST_F(CommandListCreate, givenNonExistingPtrThenAppendMemoryPrefetchReturnsError) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
auto res = commandList->appendMemoryPrefetch(nullptr, 0);
|
||||
@@ -148,7 +148,7 @@ TEST_F(CommandListCreate, givenValidPtrThenAppendMemAdviseReturnsSuccess) {
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
res = commandList->appendMemAdvise(device, ptr, size, ZE_MEMORY_ADVICE_SET_READ_MOSTLY);
|
||||
@@ -170,7 +170,7 @@ TEST_F(CommandListCreate, givenValidPtrThenAppendMemoryPrefetchReturnsSuccess) {
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
res = commandList->appendMemoryPrefetch(ptr, size);
|
||||
@@ -189,7 +189,7 @@ TEST_F(CommandListCreate, givenImmediateCommandListThenInternalEngineIsUsedIfReq
|
||||
device,
|
||||
&desc,
|
||||
internalEngine,
|
||||
false,
|
||||
NEO::EngineGroupType::RenderCompute,
|
||||
returnValue));
|
||||
ASSERT_NE(nullptr, commandList0);
|
||||
|
||||
@@ -202,7 +202,7 @@ TEST_F(CommandListCreate, givenImmediateCommandListThenInternalEngineIsUsedIfReq
|
||||
device,
|
||||
&desc,
|
||||
internalEngine,
|
||||
false,
|
||||
NEO::EngineGroupType::RenderCompute,
|
||||
returnValue));
|
||||
ASSERT_NE(nullptr, commandList1);
|
||||
|
||||
@@ -214,7 +214,7 @@ TEST_F(CommandListCreate, givenImmediateCommandListThenCustomNumIddPerBlockUsed)
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
const uint32_t cmdListImmediateIdds = CommandList::commandListimmediateIddsPerBlock;
|
||||
@@ -224,7 +224,7 @@ TEST_F(CommandListCreate, givenImmediateCommandListThenCustomNumIddPerBlockUsed)
|
||||
TEST_F(CommandListCreate, whenCreatingImmediateCommandListThenItHasImmediateCommandQueueCreated) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(device, commandList->device);
|
||||
@@ -235,7 +235,7 @@ TEST_F(CommandListCreate, whenCreatingImmediateCommandListThenItHasImmediateComm
|
||||
TEST_F(CommandListCreate, whenInvokingAppendMemoryCopyFromContextForImmediateCommandListThenSuccessIsReturned) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::Copy, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(device, commandList->device);
|
||||
@@ -264,7 +264,7 @@ TEST_F(CommandListCreate, givenQueueDescriptionwhenCreatingImmediateCommandListF
|
||||
desc.ordinal = ordinal;
|
||||
desc.index = index;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(device, commandList->device);
|
||||
@@ -276,7 +276,7 @@ TEST_F(CommandListCreate, givenQueueDescriptionwhenCreatingImmediateCommandListF
|
||||
|
||||
TEST_F(CommandListCreate, givenInvalidProductFamilyThenReturnsNullPointer) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(IGFX_UNKNOWN, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(IGFX_UNKNOWN, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
EXPECT_EQ(nullptr, commandList);
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListCreate, whenCommandListIsCreatedThenPCAnd
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
auto gmmHelper = commandContainer.getDevice()->getGmmHelper();
|
||||
|
||||
@@ -338,7 +338,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenCreatedThenStateBase
|
||||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
|
||||
GenCmdList cmdList;
|
||||
@@ -352,7 +352,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenCreatedThenStateBase
|
||||
HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenSetBarrierThenMiFlushDWIsProgrammed) {
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
commandList->appendBarrier(nullptr, 0, nullptr);
|
||||
GenCmdList cmdList;
|
||||
@@ -366,7 +366,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenSetBarrierThenMiFlus
|
||||
HWTEST_F(CommandListCreate, givenCommandListWhenSetBarrierThenPipeControlIsProgrammed) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
commandList->appendBarrier(nullptr, 0, nullptr);
|
||||
GenCmdList cmdList;
|
||||
@@ -393,7 +393,7 @@ class MockEvent : public Mock<Event> {
|
||||
|
||||
HWTEST_F(CommandListCreate, givenCommandListWithInvalidWaitEventArgWhenAppendQueryKernelTimestampsThenProperErrorRetruned) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
device->getBuiltinFunctionsLib()->initFunctions();
|
||||
MockEvent event;
|
||||
event.waitScope = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
@@ -458,7 +458,7 @@ using TestPlatforms = IsAtLeastProduct<IGFX_SKYLAKE>;
|
||||
|
||||
HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsWithoutOffsetsThenProperBuiltinWasAdded, TestPlatforms) {
|
||||
MockCommandListForAppendLaunchKernel<gfxCoreFamily> commandList;
|
||||
commandList.initialize(device, false);
|
||||
commandList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
|
||||
device->getBuiltinFunctionsLib()->initFunctions();
|
||||
MockEvent event;
|
||||
@@ -499,7 +499,7 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
|
||||
|
||||
HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsWithOffsetsThenProperBuiltinWasAdded, TestPlatforms) {
|
||||
MockCommandListForAppendLaunchKernel<gfxCoreFamily> commandList;
|
||||
commandList.initialize(device, false);
|
||||
commandList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
|
||||
device->getBuiltinFunctionsLib()->initFunctions();
|
||||
MockEvent event;
|
||||
@@ -555,7 +555,7 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
|
||||
|
||||
HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsWithEventsNumberBiggerThanMaxWorkItemSizeThenProperGroupSizeAndGroupCountIsSet, TestPlatforms) {
|
||||
MockCommandListForAppendLaunchKernel<gfxCoreFamily> commandList;
|
||||
commandList.initialize(device, false);
|
||||
commandList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
|
||||
device->getBuiltinFunctionsLib()->initFunctions();
|
||||
MockEvent event;
|
||||
@@ -656,7 +656,7 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
|
||||
|
||||
MockCommandListForAppendLaunchKernel<gfxCoreFamily> commandList;
|
||||
|
||||
commandList.initialize(&mockDevice, false);
|
||||
commandList.initialize(&mockDevice, NEO::EngineGroupType::RenderCompute);
|
||||
|
||||
MockEvent event;
|
||||
ze_event_handle_t events[2] = {event.toHandle(), event.toHandle()};
|
||||
@@ -740,7 +740,7 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
|
||||
|
||||
MockCommandListForAppendLaunchKernel<gfxCoreFamily> commandList;
|
||||
|
||||
commandList.initialize(&mockDevice, false);
|
||||
commandList.initialize(&mockDevice, NEO::EngineGroupType::RenderCompute);
|
||||
|
||||
MockEvent event;
|
||||
ze_event_handle_t events[2] = {event.toHandle(), event.toHandle()};
|
||||
@@ -760,7 +760,7 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
|
||||
HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenAppendSignalEventThenMiFlushDWIsProgrammed) {
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
MockEvent event;
|
||||
event.waitScope = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
@@ -777,7 +777,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenAppendSignalEventThe
|
||||
HWTEST_F(CommandListCreate, givenCommandListWhenAppendSignalEventThePipeControlIsProgrammed) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
MockEvent event;
|
||||
event.waitScope = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
@@ -794,7 +794,7 @@ HWTEST_F(CommandListCreate, givenCommandListWhenAppendSignalEventThePipeControlI
|
||||
HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenAppendWaitEventsWithDcFlushThenMiFlushDWIsProgrammed) {
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
MockEvent event;
|
||||
event.signalScope = 0;
|
||||
@@ -812,7 +812,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenAppendWaitEventsWith
|
||||
HWTEST_F(CommandListCreate, givenCommandListyWhenAppendWaitEventsWithDcFlushThePipeControlIsProgrammed) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
MockEvent event;
|
||||
event.signalScope = 0;
|
||||
@@ -833,7 +833,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenProfilingBeforeCommandForCo
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
|
||||
@@ -866,7 +866,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenProfilingAfterCommandForCop
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
|
||||
@@ -899,7 +899,7 @@ HWTEST2_F(CommandListCreate, givenNullEventWhenAppendEventAfterWalkerThenNothing
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
|
||||
auto usedBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
|
||||
@@ -910,7 +910,7 @@ HWTEST2_F(CommandListCreate, givenNullEventWhenAppendEventAfterWalkerThenNothing
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenGettingAllocInRangeThenAllocFromMapReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -926,7 +926,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenGettingAllocInRangeThenAlloc
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenSizeIsOutOfRangeThenNullPtrReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -942,7 +942,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenSizeIsOutOfRangeThenNullPtrR
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsOutOfRangeThenNullPtrReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -958,7 +958,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsOutOfRangeThenNullPtrRe
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenGetHostPtrAllocCalledThenCorrectOffsetIsSet, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -976,7 +976,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenGetHostPtrAllocCalledThenCor
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsInMapThenAllocationReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -991,7 +991,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsInMapThenAllocationRetu
|
||||
}
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsInMapButWithBiggerSizeThenNullPtrReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
@@ -1006,7 +1006,7 @@ HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrIsInMapButWithBiggerSizeT
|
||||
}
|
||||
HWTEST2_F(CommandListCreate, givenHostAllocInMapWhenPtrLowerThanAnyInMapThenNullPtrReturned, Platforms) {
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t gpuAddress = 0x1200;
|
||||
const void *cpuPtr = reinterpret_cast<const void *>(gpuAddress);
|
||||
size_t allocSize = 0x1000;
|
||||
|
||||
@@ -122,7 +122,7 @@ using Platforms = IsAtLeastProduct<IGFX_SKYLAKE>;
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithappendMemoryCopyKernelWithGACalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, 0x1001, nullptr, 0, nullptr);
|
||||
@@ -132,7 +132,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyCalledThenAppendMemor
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithappendMemoryCopyWithBliterCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, 0x1001, nullptr, 0, nullptr);
|
||||
@@ -142,7 +142,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyCalledThenAppendMemor
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyRegionCalledThenAppendMemoryCopyWithappendMemoryCopyWithBliterCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {};
|
||||
@@ -153,7 +153,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyRegionCalledThenAppen
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListAnd3DWhbufferenMemoryCopyRegionCalledThenCopyKernel3DCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {4, 4, 4, 2, 2, 2};
|
||||
@@ -167,7 +167,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenAppendWriteGlobalTimestampCalle
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
using POST_SYNC_OPERATION = typename PIPE_CONTROL::POST_SYNC_OPERATION;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
|
||||
uint64_t timestampAddress = 0x12345678555500;
|
||||
@@ -195,7 +195,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenAppendWriteGlobalTimestampCalle
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenAppendWriteGlobalTimestampCalledThenTimestampAllocationIsInsideResidencyContainer, Platforms) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
uint64_t timestampAddress = 0x12345678555500;
|
||||
uint64_t *dstptr = reinterpret_cast<uint64_t *>(timestampAddress);
|
||||
commandList->appendWriteGlobalTimestamp(dstptr, nullptr, 0, nullptr);
|
||||
@@ -215,7 +215,7 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenAppendWriteGlobalTimes
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<L0::CommandListCoreFamilyImmediate<gfxCoreFamily>>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
ze_result_t ret = commandList->initialize(device, false);
|
||||
ze_result_t ret = commandList->initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, ret);
|
||||
commandList->device = device;
|
||||
commandList->cmdQImmediate = &cmdQueue;
|
||||
@@ -242,7 +242,7 @@ class MockAppendMemoryCopy : public MockCommandListHw<gfxCoreFamily> {
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyRegionCalledThenTwoNewAllocationAreAddedToHostMapPtr, Platforms) {
|
||||
MockAppendMemoryCopy<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {4, 4, 4, 2, 2, 2};
|
||||
@@ -255,7 +255,7 @@ HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyRegionC
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
MockAppendMemoryCopy<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {4, 4, 4, 2, 2, 2};
|
||||
@@ -280,7 +280,7 @@ HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyCalledT
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
MockAppendMemoryCopy<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr);
|
||||
@@ -301,7 +301,7 @@ HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyCalledT
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListAnd2DWhbufferenMemoryCopyRegionCalledThenCopyKernel2DCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {4, 4, 0, 2, 2, 1};
|
||||
@@ -313,7 +313,7 @@ HWTEST2_F(CommandListCreate, givenCommandListAnd2DWhbufferenMemoryCopyRegionCall
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyOnlyCommandListWhenAppendMemoryFillCalledThenAppendBlitFillCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
int pattern = 1;
|
||||
cmdList.appendMemoryFill(dstPtr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0, nullptr);
|
||||
@@ -322,7 +322,7 @@ HWTEST2_F(CommandListCreate, givenCopyOnlyCommandListWhenAppendMemoryFillCalledT
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenAppendMemoryFillCalledThenAppendBlitFillNotCalled, Platforms) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, false);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
int pattern = 1;
|
||||
cmdList.appendMemoryFill(dstPtr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0, nullptr);
|
||||
@@ -335,7 +335,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenTimestampPassedToMemoryCopyThen
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
MockAppendMemoryCopy<gfxCoreFamily> commandList;
|
||||
commandList.initialize(device, false);
|
||||
commandList.initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
|
||||
@@ -383,7 +383,7 @@ using ImageSupport = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyFromMemoryToImageThenBlitImageCopyCalled, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -397,7 +397,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyFromMemoryToImageThenBl
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhenImageCopyFromMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -416,7 +416,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhenIma
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhenImageCopyToMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -435,7 +435,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhenIma
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DImageCopyFromMemoryWithInvalidHeightAndDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -457,7 +457,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DImageCopyToMemoryWithInvalidHeightAndDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -479,7 +479,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DArrayImageCopyFromMemoryWithInvalidHeightAndDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -501,7 +501,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DA
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DArrayImageCopyToMemoryWithInvalidHeightAndDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -523,7 +523,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen1DA
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DImageCopyToMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -544,7 +544,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DImageCopyFromMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -564,7 +564,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DImageCopyToMemoryWithInvalidDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -586,7 +586,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DImageCopyFromMemoryWithInvalidDepthThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -608,7 +608,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen2DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen3DImageCopyToMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -627,7 +627,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen3DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen3DImageCopyFromMemoryThenBlitImageCopyCalledWithCorrectImageSize, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -646,7 +646,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListAndNullDestinationRegionWhen3DI
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyFromImageToMemoryThenBlitImageCopyCalled, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x1234);
|
||||
|
||||
ze_image_desc_t zeDesc = {};
|
||||
@@ -660,7 +660,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyFromImageToMemoryThenBl
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyFromImageToImageThenBlitImageCopyCalled, ImageSupport) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
ze_image_desc_t zeDesc = {};
|
||||
auto imageHWSrc = std::make_unique<WhiteBox<::L0::ImageCoreFamily<gfxCoreFamily>>>();
|
||||
auto imageHWDst = std::make_unique<WhiteBox<::L0::ImageCoreFamily<gfxCoreFamily>>>();
|
||||
@@ -679,7 +679,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyRegionWithinMaxBlitSize
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint32_t offsetX = 0x10;
|
||||
uint32_t offsetY = 0x10;
|
||||
Vec3<size_t> copySize = {0x100, 0x10, 1};
|
||||
@@ -711,7 +711,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyRegionWithinMaxBlitSize
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint32_t offsetX = 0x10;
|
||||
uint32_t offsetY = 0x10;
|
||||
Vec3<size_t> copySize = {0x100, 0x10, 1};
|
||||
@@ -743,7 +743,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenCopyRegionGreaterThanMaxBli
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint32_t offsetX = 0x1;
|
||||
uint32_t offsetY = 0x1;
|
||||
Vec3<size_t> copySize = {BlitterConstants::maxBlitWidth + 0x100, 0x10, 1};
|
||||
@@ -794,7 +794,7 @@ class MockCommandListForRegionSize : public WhiteBox<::L0::CommandListCoreFamily
|
||||
};
|
||||
HWTEST2_F(CommandListCreate, givenZeroAsPitchAndSlicePitchWhenMemoryCopyRegionCalledSizesEqualOffsetPlusCopySize, Platforms) {
|
||||
MockCommandListForRegionSize<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {0x10, 0x10, 0, 0x100, 0x100, 1};
|
||||
@@ -813,7 +813,7 @@ HWTEST2_F(CommandListCreate, givenZeroAsPitchAndSlicePitchWhenMemoryCopyRegionCa
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenPitchAndSlicePitchWhenMemoryCopyRegionCalledSizesAreBasedOnPitch, Platforms) {
|
||||
MockCommandListForRegionSize<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {0x10, 0x10, 0, 0x100, 0x100, 1};
|
||||
@@ -851,7 +851,7 @@ HWTEST2_F(CommandListCreate, givenCopyCommandListWhenTimestampPassedToMemoryCopy
|
||||
using MI_FLUSH_DW = typename GfxFamily::MI_FLUSH_DW;
|
||||
|
||||
MockAppendMemoryCopy<gfxCoreFamily> commandList;
|
||||
commandList.initialize(device, true);
|
||||
commandList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
|
||||
@@ -58,7 +58,7 @@ HWTEST_F(CommandListAppendEventReset, givenCmdlistWhenResetEventAppendedThenPost
|
||||
HWTEST_F(CommandListAppendEventReset, givenCopyOnlyCmdlistWhenResetEventAppendedThenMiFlushWithPostSyncIsGenerated) {
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
ze_result_t returnValue;
|
||||
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, true, returnValue)));
|
||||
commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue)));
|
||||
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
|
||||
@@ -105,7 +105,7 @@ HWTEST2_F(CommandListAppendEventReset, givenImmediateCmdlistWhenAppendingEventRe
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<L0::CommandListCoreFamilyImmediate<gfxCoreFamily>>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
ze_result_t ret = commandList->initialize(device, false);
|
||||
ze_result_t ret = commandList->initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, ret);
|
||||
commandList->device = device;
|
||||
commandList->cmdQImmediate = &cmdQueue;
|
||||
|
||||
@@ -32,7 +32,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithIndirectAllocationsAllowe
|
||||
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
@@ -47,7 +47,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithIndirectAllocationsNotAll
|
||||
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
@@ -59,7 +59,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenAp
|
||||
createKernel();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
|
||||
auto &commandContainer = commandList->commandContainer;
|
||||
const auto stream = commandContainer.getCommandStream();
|
||||
@@ -96,7 +96,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListAppendLaunchKernel, givenFunctionWhenBind
|
||||
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
||||
|
||||
auto commandStream = commandList->commandContainer.getCommandStream();
|
||||
@@ -124,7 +124,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListAppendLaunchKernel, givenFunctionWhenBind
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithPrintfUsedWhenAppendedToCommandListThenKernelIsStored) {
|
||||
createKernel();
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
EXPECT_TRUE(kernel->kernelImmData->getDescriptor().kernelAttributes.flags.usesPrintf);
|
||||
@@ -139,7 +139,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithPrintfUsedWhenAppendedToC
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithPrintfUsedWhenAppendedToCommandListMultipleTimesThenKernelIsStoredOnce) {
|
||||
createKernel();
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
EXPECT_TRUE(kernel->kernelImmData->getDescriptor().kernelAttributes.flags.usesPrintf);
|
||||
@@ -158,7 +158,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithPrintfUsedWhenAppendedToC
|
||||
HWTEST_F(CommandListAppendLaunchKernel, WhenAppendingMultipleTimesThenSshIsNotDepletedButReallocated) {
|
||||
createKernel();
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
auto kernelSshSize = kernel->getSurfaceStateHeapDataSize();
|
||||
@@ -183,7 +183,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, WhenAppendingFunctionThenUsedCmdBufferS
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
ze_result_t ret = commandList->initialize(device, false);
|
||||
ze_result_t ret = commandList->initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, ret);
|
||||
|
||||
auto sizeBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
@@ -215,7 +215,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListAppendLaunchKernel, givenEventsWhenAppend
|
||||
|
||||
Mock<::L0::Kernel> kernel;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
|
||||
@@ -276,7 +276,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenTimestampEventsWhenAppendingKernel
|
||||
|
||||
Mock<::L0::Kernel> kernel;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
@@ -360,7 +360,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenKernelLaunchWithTSEventAndScopeFla
|
||||
|
||||
Mock<::L0::Kernel> kernel;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
@@ -403,7 +403,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenImmediateCommandListWhenAppendingL
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<L0::CommandListCoreFamilyImmediate<gfxCoreFamily>>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
ze_result_t ret = commandList->initialize(device, false);
|
||||
ze_result_t ret = commandList->initialize(device, NEO::EngineGroupType::RenderCompute);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, ret);
|
||||
commandList->device = device;
|
||||
commandList->cmdQImmediate = &cmdQueue;
|
||||
@@ -430,7 +430,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenIndirectDispatchWhenAppendingThenWo
|
||||
kernel.descriptor.payloadMappings.dispatchTraits.numWorkGroups[0] = 2;
|
||||
kernel.descriptor.payloadMappings.dispatchTraits.globalWorkSize[0] = 2;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
|
||||
void *alloc = nullptr;
|
||||
auto result = device->getDriverHandle()->allocDeviceMem(device->toHandle(), 0u, 16384u, 4096u, &alloc);
|
||||
@@ -466,11 +466,11 @@ HWTEST_F(CommandListAppendLaunchKernel, givenCommandListWhenResetCalledThenState
|
||||
createKernel();
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<CommandList>(whitebox_cast(L0::CommandList::create(productFamily, device, false, returnValue)));
|
||||
auto commandList = std::unique_ptr<CommandList>(whitebox_cast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
ASSERT_NE(nullptr, commandList->commandContainer.getCommandStream());
|
||||
|
||||
auto commandListControl = std::unique_ptr<CommandList>(whitebox_cast(L0::CommandList::create(productFamily, device, false, returnValue)));
|
||||
auto commandListControl = std::unique_ptr<CommandList>(whitebox_cast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)));
|
||||
ASSERT_NE(nullptr, commandListControl);
|
||||
ASSERT_NE(nullptr, commandListControl->commandContainer.getCommandStream());
|
||||
|
||||
@@ -518,7 +518,7 @@ HWTEST_F(CommandListAppendLaunchKernel, WhenAddingKernelsThenResidencyContainerD
|
||||
Mock<::L0::Kernel> kernel;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@@ -542,7 +542,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenSingleValidWaitEventsAddsSemaphoreT
|
||||
Mock<::L0::Kernel> kernel;
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList->commandContainer.getCommandStream());
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
|
||||
@@ -585,7 +585,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenMultipleValidWaitEventsAddsSemaphor
|
||||
Mock<::L0::Kernel> kernel;
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ASSERT_NE(nullptr, commandList->commandContainer.getCommandStream());
|
||||
auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
|
||||
@@ -630,7 +630,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListAppendLaunchKernel, givenAppendLaunchMult
|
||||
|
||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
const ze_kernel_handle_t launchFn = kernel->toHandle();
|
||||
uint32_t *numLaunchArgs;
|
||||
auto result = device->getDriverHandle()->allocDeviceMem(
|
||||
@@ -657,7 +657,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandListAppendLaunchKernel, givenAppendLaunchMult
|
||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||
using MI_MATH = typename FamilyType::MI_MATH;
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
auto commandList = std::unique_ptr<L0::CommandList>(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
const ze_kernel_handle_t launchFn[3] = {kernel->toHandle(), kernel->toHandle(), kernel->toHandle()};
|
||||
uint32_t *numLaunchArgs;
|
||||
const uint32_t numKernels = 3;
|
||||
|
||||
@@ -157,7 +157,7 @@ using Platforms = IsAtLeastProduct<IGFX_SKYLAKE>;
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppenBlitFillCalledWithLargePatternSizeThenMemCopyWasCalled, Platforms) {
|
||||
MockCommandListForMemFill<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t pattern[4] = {1, 2, 3, 4};
|
||||
void *ptr = reinterpret_cast<void *>(0x1234);
|
||||
cmdList.appendMemoryFill(ptr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0x1000, nullptr);
|
||||
@@ -166,7 +166,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppenBlitFillCalledWithL
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppenBlitFillToNotDeviceMemThenInvalidArgumentReturned, Platforms) {
|
||||
MockCommandListForMemFill<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint8_t pattern = 1;
|
||||
void *ptr = reinterpret_cast<void *>(0x1234);
|
||||
auto ret = cmdList.appendMemoryFill(ptr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0x1000, nullptr);
|
||||
@@ -179,7 +179,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppenBlitFillThenCopyBlt
|
||||
MockCommandListForMemFill<gfxCoreFamily> commandList;
|
||||
MockDriverHandle driverHandleMock;
|
||||
device->setDriverHandle(&driverHandleMock);
|
||||
commandList.initialize(device, true);
|
||||
commandList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint16_t pattern = 1;
|
||||
void *ptr = reinterpret_cast<void *>(0x1234);
|
||||
commandList.appendMemoryFill(ptr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0x1000, nullptr);
|
||||
@@ -193,7 +193,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppenBlitFillThenCopyBlt
|
||||
|
||||
HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenAppendBlitFillCalledWithLargePatternSizeThenInternalAllocHasPattern, Platforms) {
|
||||
MockCommandListForMemFill<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, true);
|
||||
cmdList.initialize(device, NEO::EngineGroupType::Copy);
|
||||
uint64_t pattern[4] = {1, 2, 3, 4};
|
||||
void *ptr = reinterpret_cast<void *>(0x1234);
|
||||
uint32_t fillElements = 0x101;
|
||||
@@ -212,7 +212,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListAndHostPointersWhenMemoryCop
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
commandList->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr);
|
||||
@@ -235,7 +235,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListAndHostPointersWhenMemoryCop
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
ze_copy_region_t dstRegion = {4, 4, 0, 2, 2, 1};
|
||||
@@ -260,7 +260,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyOnlyCommandListWhenWithDcFlushAddedIsNotAdd
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
uintptr_t srcPtr = 0x5001;
|
||||
uintptr_t dstPtr = 0x7001;
|
||||
uint64_t srcOffset = 0x101;
|
||||
@@ -289,7 +289,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyCommandListWhenTimestampPassedToMemoryCopyR
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
|
||||
@@ -348,7 +348,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyCommandListWhenTimestampPassedToImageCopyBl
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 1;
|
||||
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP;
|
||||
@@ -380,7 +380,7 @@ HWTEST2_F(AppendMemoryCopy, givenCopyCommandListWhenCopyFromImagBlitThenCommandA
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using XY_COPY_BLT = typename GfxFamily::XY_COPY_BLT;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
ze_image_desc_t zeDesc = {};
|
||||
auto imageHWSrc = std::make_unique<WhiteBox<::L0::ImageCoreFamily<gfxCoreFamily>>>();
|
||||
auto imageHWDst = std::make_unique<WhiteBox<::L0::ImageCoreFamily<gfxCoreFamily>>>();
|
||||
@@ -401,7 +401,7 @@ HWTEST2_F(AppendMemoryCopyFromContext, givenCommandListThenUpOnPerformingAppendM
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
|
||||
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
|
||||
commandList->initialize(device, true);
|
||||
commandList->initialize(device, NEO::EngineGroupType::Copy);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
auto result = commandList->appendMemoryCopyFromContext(dstPtr, nullptr, srcPtr, 8, nullptr, 0, nullptr);
|
||||
@@ -414,8 +414,8 @@ HWTEST2_F(AppendMemoryfillHostPtr, givenTwoCommandListsAndHostPointerUsedInBothW
|
||||
MockCommandListForMemFillHostPtr<gfxCoreFamily> cmdListSecond;
|
||||
MockDriverHandleHostPtr driverHandleMock;
|
||||
deviceMock.get()->setDriverHandle(&driverHandleMock);
|
||||
cmdListFirst.initialize(deviceMock.get(), false);
|
||||
cmdListSecond.initialize(deviceMock.get(), false);
|
||||
cmdListFirst.initialize(deviceMock.get(), NEO::EngineGroupType::RenderCompute);
|
||||
cmdListSecond.initialize(deviceMock.get(), NEO::EngineGroupType::RenderCompute);
|
||||
uint64_t pattern[4] = {1, 2, 3, 4};
|
||||
void *ptr = reinterpret_cast<void *>(registeredGraphicsAllocationAddress);
|
||||
cmdListFirst.appendMemoryFill(ptr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0x1000, nullptr);
|
||||
@@ -432,7 +432,7 @@ HWTEST2_F(AppendMemoryfillHostPtr, givenCommandListAndHostPointerWhenMemoryfillC
|
||||
MockCommandListForMemFillHostPtr<gfxCoreFamily> cmdList;
|
||||
MockDriverHandleHostPtr driverHandleMock;
|
||||
deviceMock.get()->setDriverHandle(&driverHandleMock);
|
||||
cmdList.initialize(deviceMock.get(), false);
|
||||
cmdList.initialize(deviceMock.get(), NEO::EngineGroupType::RenderCompute);
|
||||
uint64_t pattern[4] = {1, 2, 3, 4};
|
||||
void *ptr = reinterpret_cast<void *>(registeredGraphicsAllocationAddress);
|
||||
cmdList.appendMemoryFill(ptr, reinterpret_cast<void *>(&pattern), sizeof(pattern), 0x1000, nullptr);
|
||||
|
||||
@@ -134,7 +134,7 @@ TEST_F(CommandQueueCreate, givenCmdQueueWithBlitCopyWhenExecutingNonCopyBlitComm
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
auto commandListHandle = commandList->toHandle();
|
||||
auto status = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false);
|
||||
|
||||
@@ -155,7 +155,7 @@ TEST_F(CommandQueueCreate, givenCmdQueueWithBlitCopyWhenExecutingCopyBlitCommand
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto commandListHandle = commandList->toHandle();
|
||||
auto status = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false);
|
||||
|
||||
@@ -197,7 +197,7 @@ HWTEST_F(CommandQueueCommands, givenCommandQueueWhenExecutingCommandListsThenHar
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
auto commandListHandle = commandList->toHandle();
|
||||
auto status = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false);
|
||||
|
||||
@@ -233,7 +233,7 @@ HWTEST_F(CommandQueueIndirectAllocations, givenCommandQueueWhenExecutingCommandL
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, true, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, returnValue));
|
||||
|
||||
void *deviceAlloc = nullptr;
|
||||
auto result = device->getDriverHandle()->allocDeviceMem(device->toHandle(), 0u, 16384u, 4096u, &deviceAlloc);
|
||||
|
||||
@@ -95,7 +95,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenKerne
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -159,7 +159,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedTwiceThen
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -256,7 +256,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledAndRequiredGsbaWhenCommandListIsE
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -303,7 +303,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledAndPrintDebugMessagesWhenCommandQu
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
const uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -339,7 +339,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenNullL0DebuggerAndPrintDebugMessagesWhenComma
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
const uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -370,7 +370,7 @@ HWTEST_F(L0DebuggerTest, givenL0DebuggerAndPrintDebugMessagesSetToFalseWhenComma
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
const uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
@@ -393,7 +393,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledWhenNonCopyCommandListIsInititali
|
||||
|
||||
size_t usedSpaceBefore = 0;
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandListHandle = CommandList::create(productFamily, device, false, returnValue)->toHandle();
|
||||
ze_command_list_handle_t commandListHandle = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle();
|
||||
auto commandList = CommandList::fromHandle(commandListHandle);
|
||||
|
||||
auto usedSpaceAfter = commandList->commandContainer.getCommandStream()->getUsed();
|
||||
@@ -423,7 +423,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenBindle
|
||||
|
||||
Mock<::L0::Kernel> kernel;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
auto result = commandList->appendLaunchKernel(kernel.toHandle(), &groupCount, nullptr, 0, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
@@ -462,7 +462,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenSbaB
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, device, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
|
||||
@@ -35,7 +35,7 @@ HWTEST_F(CommandQueueDebugCommandsTest, givenDebuggingEnabledWhenCommandListIsEx
|
||||
|
||||
ze_result_t returnValue;
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
CommandList::create(productFamily, deviceL0, false, returnValue)->toHandle()};
|
||||
CommandList::create(productFamily, deviceL0, NEO::EngineGroupType::RenderCompute, returnValue)->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true);
|
||||
|
||||
@@ -447,7 +447,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetCommandListAppendMetricQ
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
Mock<MetricGroup> metricGroup;
|
||||
@@ -600,7 +600,7 @@ TEST_F(MetricQueryPoolTest, givenIncorrectArgumentsWhenZetCommandListAppendMetri
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -711,7 +711,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetCommandListAppendMetricQ
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -828,7 +828,7 @@ TEST_F(MetricQueryPoolTest, givenIncorrectArgumentsWhenZetMetricQueryGetDataIsCa
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -944,7 +944,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetMetricQueryGetDataIsCall
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -1088,7 +1088,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetMetricQueryGetDataIsCall
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
|
||||
@@ -275,7 +275,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetCommandListAppendMetricQ
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -391,7 +391,7 @@ TEST_F(MetricQueryPoolTest, givenIncorrectArgumentsWhenZetMetricQueryGetDataIsCa
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -507,7 +507,7 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenZetMetricQueryGetDataIsCall
|
||||
zet_device_handle_t metricDevice = device->toHandle();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
ze_event_pool_handle_t eventPoolHandle = {};
|
||||
@@ -674,7 +674,7 @@ TEST_F(MetricQueryPoolTest, givenExecutionQueryTypeWhenAppendMetricQueryBeginAnd
|
||||
poolDesc.type = ZET_METRIC_QUERY_POOL_TYPE_EXECUTION;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
TypedValue_1_0 value = {};
|
||||
@@ -736,7 +736,7 @@ TEST_F(MetricQueryPoolTest, givenExecutionQueryTypeAndCompletionEventWhenAppendM
|
||||
poolDesc.type = ZET_METRIC_QUERY_POOL_TYPE_EXECUTION;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
TypedValue_1_0 value = {};
|
||||
@@ -820,7 +820,7 @@ TEST_F(MetricQueryPoolTest, givenExecutionQueryTypeAndMetricsLibraryWillFailWhen
|
||||
poolDesc.type = ZET_METRIC_QUERY_POOL_TYPE_EXECUTION;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
zet_command_list_handle_t commandListHandle = commandList->toHandle();
|
||||
|
||||
TypedValue_1_0 value = {};
|
||||
|
||||
@@ -703,7 +703,7 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetCommandListAppendMetricStre
|
||||
|
||||
// One api: command list handle.
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
|
||||
// One api: streamer handle.
|
||||
zet_metric_streamer_handle_t streamerHandle = {};
|
||||
@@ -852,7 +852,7 @@ TEST_F(MetricStreamerTest, givenMultipleMarkerInsertionsWhenZetCommandListAppend
|
||||
|
||||
// One api: command list handle.
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, false, returnValue));
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, returnValue));
|
||||
|
||||
// One api: streamer handle.
|
||||
zet_metric_streamer_handle_t streamerHandle = {};
|
||||
|
||||
Reference in New Issue
Block a user