mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
test: add additional check if npstates are expected
Related-To: NEO-10641 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3758e99cbf
commit
b984510228
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/wait_status.h"
|
#include "shared/source/command_stream/wait_status.h"
|
||||||
#include "shared/source/direct_submission/relaxed_ordering_helper.h"
|
#include "shared/source/direct_submission/relaxed_ordering_helper.h"
|
||||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper.h"
|
||||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
@@ -1143,6 +1144,10 @@ HWTEST2_F(CommandListCreate, givenDirectSubmissionAndImmCmdListWhenDispatchingTh
|
|||||||
auto ultCsr = static_cast<NEO::UltCommandStreamReceiver<FamilyType> *>(whiteBoxCmdList->getCsr(false));
|
auto ultCsr = static_cast<NEO::UltCommandStreamReceiver<FamilyType> *>(whiteBoxCmdList->getCsr(false));
|
||||||
ultCsr->recordFlusheBatchBuffer = true;
|
ultCsr->recordFlusheBatchBuffer = true;
|
||||||
|
|
||||||
|
auto &compilerProductHelper = device->getCompilerProductHelper();
|
||||||
|
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
|
||||||
|
auto heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
|
||||||
|
|
||||||
auto verifyFlags = [&ultCsr, useImmediateFlushTask](ze_result_t result, bool dispatchFlag, bool bbFlag) {
|
auto verifyFlags = [&ultCsr, useImmediateFlushTask](ze_result_t result, bool dispatchFlag, bool bbFlag) {
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
if (useImmediateFlushTask) {
|
if (useImmediateFlushTask) {
|
||||||
@@ -1153,7 +1158,8 @@ HWTEST2_F(CommandListCreate, givenDirectSubmissionAndImmCmdListWhenDispatchingTh
|
|||||||
EXPECT_EQ(ultCsr->latestFlushedBatchBuffer.hasStallingCmds, bbFlag);
|
EXPECT_EQ(ultCsr->latestFlushedBatchBuffer.hasStallingCmds, bbFlag);
|
||||||
};
|
};
|
||||||
// non-pipelined state
|
// non-pipelined state
|
||||||
verifyFlags(commandList->appendLaunchKernel(kernel.toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false), false, true);
|
bool shouldProgramNPStates = !heaplessStateInitEnabled;
|
||||||
|
verifyFlags(commandList->appendLaunchKernel(kernel.toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false), false, shouldProgramNPStates);
|
||||||
|
|
||||||
// non-pipelined state already programmed
|
// non-pipelined state already programmed
|
||||||
verifyFlags(commandList->appendLaunchKernel(kernel.toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false), false, false);
|
verifyFlags(commandList->appendLaunchKernel(kernel.toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false), false, false);
|
||||||
|
|||||||
@@ -229,6 +229,15 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
|||||||
return BaseClass::flushImmediateTask(immediateCommandStream, immediateCommandStreamStart, dispatchFlags, device);
|
return BaseClass::flushImmediateTask(immediateCommandStream, immediateCommandStreamStart, dispatchFlags, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompletionStamp flushImmediateTaskStateless(LinearStream &immediateCommandStream,
|
||||||
|
size_t immediateCommandStreamStart,
|
||||||
|
ImmediateDispatchFlags &dispatchFlags,
|
||||||
|
Device &device) override {
|
||||||
|
recordedImmediateDispatchFlags = dispatchFlags;
|
||||||
|
this->lastFlushedCommandStream = &commandStream;
|
||||||
|
return BaseClass::flushImmediateTaskStateless(immediateCommandStream, immediateCommandStreamStart, dispatchFlags, device);
|
||||||
|
}
|
||||||
|
|
||||||
bool writeMemory(GraphicsAllocation &gfxAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
bool writeMemory(GraphicsAllocation &gfxAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
||||||
writeMemoryParams.totalCallCount++;
|
writeMemoryParams.totalCallCount++;
|
||||||
if (isChunkCopy) {
|
if (isChunkCopy) {
|
||||||
|
|||||||
Reference in New Issue
Block a user