mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix:pass bool to get CS size instead of reevaluate
Pass resolveDependenciesByPipecontrol bool value to get command stream methods instead of reevaluating the condition. Related-To: NEO-7321 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b3c2fa41c5
commit
a634c6a7b1
@@ -461,7 +461,7 @@ class CommandQueueHw : public CommandQueue {
|
||||
LinearStream *obtainCommandStream(const CsrDependencies &csrDependencies, bool blitEnqueue, bool blockedQueue,
|
||||
const MultiDispatchInfo &multiDispatchInfo, const EventsRequest &eventsRequest,
|
||||
std::unique_ptr<KernelOperation> &blockedCommandsData,
|
||||
Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling) {
|
||||
Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling, bool resolveDependenciesByPipecontrol) {
|
||||
LinearStream *commandStream = nullptr;
|
||||
|
||||
bool profilingRequired = (this->isProfilingEnabled() && eventsRequest.outEvent);
|
||||
@@ -478,7 +478,7 @@ class CommandQueueHw : public CommandQueue {
|
||||
blockedCommandsData = std::make_unique<KernelOperation>(commandStream, *gpgpuCsr.getInternalAllocationStorage());
|
||||
} else {
|
||||
commandStream = &getCommandStream<GfxFamily, commandType>(*this, csrDependencies, profilingRequired, perfCountersRequired,
|
||||
blitEnqueue, multiDispatchInfo, surfaces, numSurfaces, isMarkerWithProfiling, eventsRequest.numEventsInWaitList > 0, eventsRequest.outEvent);
|
||||
blitEnqueue, multiDispatchInfo, surfaces, numSurfaces, isMarkerWithProfiling, eventsRequest.numEventsInWaitList > 0, resolveDependenciesByPipecontrol, eventsRequest.outEvent);
|
||||
}
|
||||
return commandStream;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ bool CommandQueueHw<Family>::isCacheFlushCommand(uint32_t commandType) const {
|
||||
}
|
||||
|
||||
template <>
|
||||
LinearStream &getCommandStream<Family, CL_COMMAND_RESOURCE_BARRIER>(CommandQueue &commandQueue, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounterCmdsSpace, bool blitEnqueue, const MultiDispatchInfo &multiDispatchInfo, Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling, bool eventsInWaitList, cl_event *outEvent) {
|
||||
LinearStream &getCommandStream<Family, CL_COMMAND_RESOURCE_BARRIER>(CommandQueue &commandQueue, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounterCmdsSpace, bool blitEnqueue, const MultiDispatchInfo &multiDispatchInfo, Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling, bool eventsInWaitList, bool resolveDependenciesByPipecontrol, cl_event *outEvent) {
|
||||
size_t expectedSizeCS = 0;
|
||||
[[maybe_unused]] bool usePostSync = false;
|
||||
if (commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
||||
|
||||
@@ -222,7 +222,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
}
|
||||
|
||||
auto &commandStream = *obtainCommandStream<commandType>(csrDeps, false, blockQueue, multiDispatchInfo, eventsRequest,
|
||||
blockedCommandsData, surfacesForResidency, numSurfaceForResidency, isMarkerWithPostSyncWrite);
|
||||
blockedCommandsData, surfacesForResidency, numSurfaceForResidency, canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies, isMarkerWithPostSyncWrite);
|
||||
auto commandStreamStart = commandStream.getUsed();
|
||||
|
||||
if (canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies) {
|
||||
@@ -1391,7 +1391,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDisp
|
||||
if (DebugManager.flags.ForceCsrLockInBcsEnqueueOnlyForGpgpuSubmission.get() == 1) {
|
||||
commandStreamReceiverOwnership = getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
|
||||
}
|
||||
gpgpuCommandStream = obtainCommandStream<cmdType>(csrDeps, true, blockQueue, multiDispatchInfo, eventsRequest, blockedCommandsData, nullptr, 0, false);
|
||||
gpgpuCommandStream = obtainCommandStream<cmdType>(csrDeps, true, blockQueue, multiDispatchInfo, eventsRequest, blockedCommandsData, nullptr, 0, false, false);
|
||||
gpgpuCommandStreamStart = gpgpuCommandStream->getUsed();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class GpgpuWalkerHelper {
|
||||
template <typename GfxFamily>
|
||||
struct EnqueueOperation {
|
||||
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
||||
static size_t getTotalSizeRequiredCS(uint32_t eventType, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounters, bool blitEnqueue, CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, bool isMarkerWithProfiling, bool eventsInWaitList, cl_event *outEvent);
|
||||
static size_t getTotalSizeRequiredCS(uint32_t eventType, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounters, bool blitEnqueue, CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, bool isMarkerWithProfiling, bool eventsInWaitList, bool resolveDependenciesByPipecontrol, cl_event *outEvent);
|
||||
static size_t getSizeRequiredCS(uint32_t cmdType, bool reserveProfilingCmdsSpace, bool reservePerfCounters, CommandQueue &commandQueue, const Kernel *pKernel, const DispatchInfo &dispatchInfo);
|
||||
static size_t getSizeRequiredForTimestampPacketWrite();
|
||||
static size_t getSizeForCacheFlushAfterWalkerCommands(const Kernel &kernel, const CommandQueue &commandQueue);
|
||||
@@ -101,8 +101,8 @@ struct EnqueueOperation {
|
||||
template <typename GfxFamily, uint32_t eventType>
|
||||
LinearStream &getCommandStream(CommandQueue &commandQueue, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace,
|
||||
bool reservePerfCounterCmdsSpace, bool blitEnqueue, const MultiDispatchInfo &multiDispatchInfo,
|
||||
Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling, bool eventsInWaitList, cl_event *outEvent) {
|
||||
size_t expectedSizeCS = EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(eventType, csrDeps, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, blitEnqueue, commandQueue, multiDispatchInfo, isMarkerWithProfiling, eventsInWaitList, outEvent);
|
||||
Surface **surfaces, size_t numSurfaces, bool isMarkerWithProfiling, bool eventsInWaitList, bool resolveDependenciesByPipecontrol, cl_event *outEvent) {
|
||||
size_t expectedSizeCS = EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(eventType, csrDeps, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, blitEnqueue, commandQueue, multiDispatchInfo, isMarkerWithProfiling, eventsInWaitList, resolveDependenciesByPipecontrol, outEvent);
|
||||
return commandQueue.getCS(expectedSizeCS);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,11 +166,9 @@ size_t GpgpuWalkerHelper<GfxFamily>::getSizeForWaDisableRccRhwoOptimization(cons
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
size_t EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(uint32_t eventType, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounters, bool blitEnqueue, CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, bool isMarkerWithProfiling, bool eventsInWaitlist, cl_event *outEvent) {
|
||||
size_t EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(uint32_t eventType, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounters, bool blitEnqueue, CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, bool isMarkerWithProfiling, bool eventsInWaitlist, bool resolveDependenciesByPipecontrol, cl_event *outEvent) {
|
||||
size_t expectedSizeCS = 0;
|
||||
auto &hwInfo = commandQueue.getDevice().getHardwareInfo();
|
||||
auto &gfxCoreHelper = commandQueue.getDevice().getGfxCoreHelper();
|
||||
auto &productHelper = commandQueue.getDevice().getProductHelper();
|
||||
|
||||
auto &commandQueueHw = static_cast<CommandQueueHw<GfxFamily> &>(commandQueue);
|
||||
auto &rootDeviceEnvironment = commandQueue.getDevice().getRootDeviceEnvironment();
|
||||
@@ -201,7 +199,7 @@ size_t EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(uint32_t eventType, c
|
||||
// add relaxed ordering cond_bb_start
|
||||
expectedSizeCS += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(csrDeps, relaxedOrderingEnabled);
|
||||
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredForTimestampPacketWrite();
|
||||
if (productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, commandQueue.isOOQEnabled())) {
|
||||
if (resolveDependenciesByPipecontrol) {
|
||||
expectedSizeCS += MemorySynchronizationCommands<GfxFamily>::getSizeForSingleBarrier(false);
|
||||
}
|
||||
if (isMarkerWithProfiling) {
|
||||
|
||||
@@ -767,7 +767,7 @@ HWTEST_F(DispatchWalkerTest, givenBlockedEnqueueWhenObtainingCommandStreamThenAl
|
||||
EventsRequest eventsRequest(0, nullptr, nullptr);
|
||||
auto cmdStream = mockCmdQ.template obtainCommandStream<CL_COMMAND_NDRANGE_KERNEL>(csrDependencies, false, true,
|
||||
multiDispatchInfo, eventsRequest, blockedKernelData,
|
||||
nullptr, 0u, false);
|
||||
nullptr, 0u, false, false);
|
||||
|
||||
EXPECT_EQ(expectedSizeCS, cmdStream->getMaxAvailableSpace());
|
||||
EXPECT_EQ(expectedSizeCSAllocation, cmdStream->getGraphicsAllocation()->getUnderlyingBufferSize());
|
||||
|
||||
@@ -555,19 +555,21 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenTimestamp
|
||||
MockKernelWithInternals kernel1(*device);
|
||||
MockKernelWithInternals kernel2(*device);
|
||||
MockMultiDispatchInfo multiDispatchInfo(device.get(), std::vector<Kernel *>({kernel1.mockKernel, kernel2.mockKernel}));
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
const auto &productHelper = device->getProductHelper();
|
||||
const bool isResolveDependenciesByPipeControlsEnabled = productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, cmdQ.isOOQEnabled());
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = false;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(cmdQ, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(cmdQ, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, isResolveDependenciesByPipeControlsEnabled, nullptr);
|
||||
size_t sizeWithDisabled = cmdQ.requestedCmdStreamSize;
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = true;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(cmdQ, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(cmdQ, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, isResolveDependenciesByPipeControlsEnabled, nullptr);
|
||||
size_t sizeWithEnabled = cmdQ.requestedCmdStreamSize;
|
||||
|
||||
size_t additionalSize = 0u;
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
const auto &productHelper = device->getProductHelper();
|
||||
if (productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, cmdQ.isOOQEnabled())) {
|
||||
|
||||
if (isResolveDependenciesByPipeControlsEnabled) {
|
||||
additionalSize = MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false);
|
||||
}
|
||||
|
||||
@@ -669,7 +671,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenAutoLocal
|
||||
EXPECT_EQ((uint32_t)(expectedKernelStartOffset), idd.getKernelStartPointer());
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, CsrDependencies(), false, false,
|
||||
false, *cmdQ.get(), multiDispatchInfo, false, false, nullptr);
|
||||
false, *cmdQ.get(), multiDispatchInfo, false, false, false, nullptr);
|
||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||
expectedSizeCS = alignUp(expectedSizeCS, MemoryConstants::cacheLineSize);
|
||||
EXPECT_GE(expectedSizeCS, usedAfterCS - usedBeforeCS);
|
||||
@@ -738,7 +740,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
|
||||
EXPECT_EQ((uint32_t)(expectedKernelStartOffset), idd.getKernelStartPointer());
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, CsrDependencies(), false, false,
|
||||
false, *cmdQ.get(), multiDispatchInfo, false, false, nullptr);
|
||||
false, *cmdQ.get(), multiDispatchInfo, false, false, false, nullptr);
|
||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||
expectedSizeCS = alignUp(expectedSizeCS, MemoryConstants::cacheLineSize);
|
||||
EXPECT_GE(expectedSizeCS, usedAfterCS - usedBeforeCS);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/pause_on_gpu_properties.h"
|
||||
@@ -12,6 +13,7 @@
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/kernel_binary_helper.h"
|
||||
#include "shared/test/common/helpers/raii_gfx_core_helper.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/mocks/mock_csr.h"
|
||||
#include "shared/test/common/mocks/mock_submissions_aggregator.h"
|
||||
@@ -24,7 +26,6 @@
|
||||
#include "opencl/test/unit_test/helpers/cl_hw_parse.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
|
||||
#include "opencl/test/unit_test/test_macros/test_checks_ocl.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
||||
@@ -2005,10 +2006,51 @@ HWTEST_F(PauseOnGpuTests, givenGpuScratchWriteEnabledWhenEstimatingCommandStream
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
DebugManager.flags.GpuScratchRegWriteAfterWalker.set(1);
|
||||
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + sizeof(typename FamilyType::MI_LOAD_REGISTER_IMM), extendedCommandStreamSize);
|
||||
}
|
||||
|
||||
HWTEST_F(PauseOnGpuTests, givenResolveDependenciesByPipecontrolWhenEstimatingCommandStreamSizeThenPipeControlSizeIsIncluded) {
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
DispatchInfo dispatchInfo;
|
||||
MultiDispatchInfo multiDispatchInfo(mockKernel.mockKernel);
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.timestampPacketWriteEnabled = true;
|
||||
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, true, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false), extendedCommandStreamSize);
|
||||
}
|
||||
|
||||
HWTEST_F(PauseOnGpuTests, givenTimestampPacketWriteDisabledAndMarkerWithProfilingWhenEstimatingCommandStreamSizeThenStoreMMIOSizeIsIncluded) {
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
DispatchInfo dispatchInfo;
|
||||
MultiDispatchInfo multiDispatchInfo(mockKernel.mockKernel);
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.timestampPacketWriteEnabled = false;
|
||||
|
||||
struct FakeGfxCoreHelper : GfxCoreHelperHw<FamilyType> {
|
||||
bool useOnlyGlobalTimestampsValue{false};
|
||||
bool useOnlyGlobalTimestamps() const override {
|
||||
return useOnlyGlobalTimestampsValue;
|
||||
}
|
||||
};
|
||||
RAIIGfxCoreHelperFactory<FakeGfxCoreHelper> overrideGfxCoreHelper{*pDevice->executionEnvironment->rootDeviceEnvironments[0]};
|
||||
|
||||
overrideGfxCoreHelper.mockGfxCoreHelper->useOnlyGlobalTimestampsValue = true;
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, false, nullptr);
|
||||
overrideGfxCoreHelper.mockGfxCoreHelper->useOnlyGlobalTimestampsValue = false;
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, true, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + 2 * EncodeStoreMMIO<FamilyType>::size, extendedCommandStreamSize);
|
||||
}
|
||||
@@ -1018,8 +1018,8 @@ HWTEST_F(EnqueueKernelTest, givenTimestampWriteEnableWhenMarkerProfilingWithoutW
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, nullptr);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, false, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + 4 * EncodeStoreMMIO<FamilyType>::size + MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false), extendedCommandStreamSize);
|
||||
}
|
||||
@@ -1049,10 +1049,10 @@ HWTEST_F(EnqueueKernelTest, givenRelaxedOrderingEnabledWhenCheckingSizeForCsThen
|
||||
csrDeps.timestampPacketContainer.push_back(×tamp1);
|
||||
|
||||
directSubmission->relaxedOrderingEnabled = false;
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
|
||||
directSubmission->relaxedOrderingEnabled = true;
|
||||
auto newCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto newCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
|
||||
auto semaphoresSize = numberOfDependencyContainers * numberNodesPerContainer * sizeof(typename FamilyType::MI_SEMAPHORE_WAIT);
|
||||
auto conditionalBbsSize = numberOfDependencyContainers * numberNodesPerContainer * EncodeBatchBufferStartOrEnd<FamilyType>::getCmdSizeConditionalDataMemBatchBufferStart();
|
||||
@@ -1192,8 +1192,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, EnqueueKernelTest, givenTimestampWriteEnableOnMulti
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, nullptr);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, false, false, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + 4 * EncodeStoreMMIO<FamilyType>::size + ImplicitScalingDispatch<FamilyType>::getBarrierSize(pDevice->getRootDeviceEnvironment(), false, false), extendedCommandStreamSize);
|
||||
}
|
||||
@@ -1206,8 +1206,8 @@ HWTEST_F(EnqueueKernelTest, givenTimestampWriteEnableWhenMarkerProfilingWithWait
|
||||
dispatchInfo.setKernel(mockKernel.mockKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, true, nullptr);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, true, true, false, nullptr);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + 4 * EncodeStoreMMIO<FamilyType>::size, extendedCommandStreamSize);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenFillingBufferThenHeapsAndCommandBufferCo
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_FILL_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -150,7 +150,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenCopyingBufferThenHeapsAndCommandBufferCo
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_COPY_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -204,7 +204,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenReadingBufferNonBlockingThenHeapsAndComm
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -259,7 +259,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenReadingBufferBlockingThenThenHeapsAndCom
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -314,7 +314,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferNonBlockingThenHeapsAndComm
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -366,7 +366,7 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferBlockingThenHeapsAndCommand
|
||||
auto usedAfterSSH = ssh.getUsed();
|
||||
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
@@ -395,8 +395,8 @@ HWTEST_F(GetSizeRequiredBufferTest, GivenOutEventForSingleDeviceContextWhenCalcu
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto event = std::make_unique<MockEvent<Event>>(&pContext, nullptr, 0, 0, 0);
|
||||
cl_event clEvent = event.get();
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, &clEvent);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, &clEvent);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize, extendedCommandStreamSize);
|
||||
}
|
||||
@@ -416,8 +416,8 @@ HWTEST_F(GetSizeRequiredBufferTest, GivenUserEventForMultiDeviceContextWhenCalcu
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto userEvent1 = std::make_unique<UserEvent>(&pContext);
|
||||
cl_event clEvent = userEvent1.get();
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, &clEvent);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, &clEvent);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize, extendedCommandStreamSize);
|
||||
}
|
||||
@@ -437,8 +437,8 @@ HWTEST_F(GetSizeRequiredBufferTest, GivenOutEventForMultiDeviceContextWhenCalcul
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto event = std::make_unique<MockEvent<Event>>(&pContext, nullptr, 0, 0, 0);
|
||||
cl_event clEvent = event.get();
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, &clEvent);
|
||||
auto baseCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto extendedCommandStreamSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_MARKER, {}, false, false, false, *pCmdQ, multiDispatchInfo, false, false, false, &clEvent);
|
||||
|
||||
EXPECT_EQ(baseCommandStreamSize + MemorySynchronizationCommands<FamilyType>::getSizeForBarrierWithPostSyncOperation(pContext.getDevices()[0]->getRootDeviceEnvironment(), false), extendedCommandStreamSize);
|
||||
}
|
||||
|
||||
@@ -34,11 +34,11 @@ HWCMDTEST_F(IGFX_GEN8_CORE, TimestampPacketTests, givenTimestampPacketWriteEnabl
|
||||
auto mockCmdQHw = std::make_unique<MockCommandQueueHw<FamilyType>>(context, device.get(), nullptr);
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = false;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto sizeWithDisabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = true;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto sizeWithEnabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
auto extendedSize = sizeWithDisabled + sizeof(typename FamilyType::PIPE_CONTROL);
|
||||
@@ -52,7 +52,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledAndOoqWhenEstimat
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = false;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false,
|
||||
false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto sizeWithDisabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = true;
|
||||
@@ -82,7 +82,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledAndOoqWhenEstimat
|
||||
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(
|
||||
csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr);
|
||||
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto sizeWithEnabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
size_t sizeForNodeDependency = 0;
|
||||
@@ -143,7 +143,10 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEstimatingStr
|
||||
auto mockCmdQHw = std::make_unique<MockCommandQueueHw<FamilyType>>(context, device.get(), nullptr);
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = false;
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
const auto &productHelper = device->getProductHelper();
|
||||
const bool isResolveDependenciesByPipeControlsEnabled = productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, mockCmdQHw->isOOQEnabled());
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, CsrDependencies(), false, false, false, multiDispatchInfo, nullptr, 0, false, false, isResolveDependenciesByPipeControlsEnabled, nullptr);
|
||||
auto sizeWithDisabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = true;
|
||||
@@ -172,7 +175,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEstimatingStr
|
||||
CsrDependencies csrDeps;
|
||||
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, device->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr);
|
||||
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*mockCmdQHw, csrDeps, false, false, false, multiDispatchInfo, nullptr, 0, false, false, isResolveDependenciesByPipeControlsEnabled, nullptr);
|
||||
auto sizeWithEnabled = mockCmdQHw->requestedCmdStreamSize;
|
||||
|
||||
size_t sizeForNodeDependency = 0;
|
||||
@@ -183,9 +186,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEstimatingStr
|
||||
}
|
||||
|
||||
size_t sizeForPipeControl = 0;
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
const auto &productHelper = device->getProductHelper();
|
||||
if (productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, mockCmdQHw->isOOQEnabled())) {
|
||||
if (isResolveDependenciesByPipeControlsEnabled) {
|
||||
sizeForPipeControl = MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ HWTEST2_F(KernelWithCacheFlushTests, givenCacheFlushRequiredWhenEstimatingThenAd
|
||||
{
|
||||
EXPECT_FALSE(mockKernel->mockKernel->Kernel::requiresCacheFlushCommand(*cmdQ));
|
||||
|
||||
initialSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *cmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
initialSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *cmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -227,7 +227,7 @@ HWTEST2_F(KernelWithCacheFlushTests, givenCacheFlushRequiredWhenEstimatingThenAd
|
||||
ultCsr.multiOsContextCapable = false;
|
||||
EXPECT_TRUE(mockKernel->mockKernel->Kernel::requiresCacheFlushCommand(*cmdQ));
|
||||
|
||||
sizeWithCacheFlush = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *cmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
sizeWithCacheFlush = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, csrDeps, false, false, false, *cmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
}
|
||||
|
||||
EXPECT_EQ(initialSize + expectedDiff, sizeWithCacheFlush);
|
||||
|
||||
@@ -766,11 +766,11 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBufferOperationWithoutKernelWhenEstimati
|
||||
MultiDispatchInfo multiDispatchInfo;
|
||||
|
||||
auto readBufferCmdsSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, csrDependencies, false, false,
|
||||
true, *cmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
true, *cmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto writeBufferCmdsSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, csrDependencies, false, false,
|
||||
true, *cmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
true, *cmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto copyBufferCmdsSize = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_COPY_BUFFER, csrDependencies, false, false,
|
||||
true, *cmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
true, *cmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
auto expectedSize = TimestampPacketHelper::getRequiredCmdStreamSizeForNodeDependencyWithBlitEnqueue<FamilyType>();
|
||||
|
||||
if (cmdQ->isCacheFlushForBcsRequired()) {
|
||||
|
||||
@@ -72,13 +72,13 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfilingAndFor
|
||||
|
||||
MultiDispatchInfo multiDispatchInfo(&kernel);
|
||||
auto &commandStreamNDRangeKernel = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, CsrDependencies(), true, false, false,
|
||||
multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, false, *pCmdQ, &kernel, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamNDRangeKernel.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, CsrDependencies(), true, false, false,
|
||||
multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_TASK, true, false, *pCmdQ, &kernel, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
@@ -94,13 +94,13 @@ HWTEST_F(ProfilingTests, GivenCommandQueueWithProfilingAndForWorkloadWithNoKerne
|
||||
MultiDispatchInfo multiDispatchInfo(nullptr);
|
||||
auto &commandStreamMigrateMemObjects = getCommandStream<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>(*pCmdQ, CsrDependencies(),
|
||||
true, false, false,
|
||||
multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, false, *pCmdQ, nullptr, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamMarker = getCommandStream<FamilyType, CL_COMMAND_MARKER>(*pCmdQ, CsrDependencies(), true,
|
||||
false, false, multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
false, false, multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MARKER, true, false, *pCmdQ, nullptr, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize);
|
||||
@@ -122,9 +122,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfilingAndFor
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, CsrDependencies(), true, false, false,
|
||||
multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_TASK, CsrDependencies(), true, false,
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, nullptr);
|
||||
false, *pCmdQ, multiDispatchInfo, false, false, false, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
}
|
||||
@@ -742,13 +742,13 @@ HWTEST_F(ProfilingWithPerfCountersTests, GivenCommandQueueWithProfilingPerfCount
|
||||
MultiDispatchInfo multiDispatchInfo(nullptr);
|
||||
auto &commandStreamMigrateMemObjects = getCommandStream<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>(*pCmdQ, CsrDependencies(),
|
||||
true, true, false, multiDispatchInfo,
|
||||
nullptr, 0, false, false, nullptr);
|
||||
nullptr, 0, false, false, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, true, *pCmdQ, nullptr, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamMarker = getCommandStream<FamilyType, CL_COMMAND_MARKER>(*pCmdQ, CsrDependencies(), true, true, false,
|
||||
multiDispatchInfo, nullptr, 0, false, false, nullptr);
|
||||
multiDispatchInfo, nullptr, 0, false, false, false, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MARKER, true, true, *pCmdQ, nullptr, {});
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize);
|
||||
|
||||
Reference in New Issue
Block a user