mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 00:10:58 +08:00
Enable BCS split WA in OCL
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
11374b83af
commit
d672920121
@@ -251,6 +251,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
static bool isAssignEngineRoundRobinEnabled();
|
||||
static bool isTimestampWaitEnabled();
|
||||
static bool isBlitSplitEnabled();
|
||||
|
||||
MOCKABLE_VIRTUAL void releaseIndirectHeap(IndirectHeap::Type heapType);
|
||||
|
||||
|
||||
@@ -1105,7 +1105,8 @@ size_t CommandQueueHw<GfxFamily>::calculateHostPtrSizeForImage(const size_t *reg
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool CommandQueueHw<GfxFamily>::isSplitEnqueueBlitSupported() {
|
||||
auto bcsSplit = HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily)->isBlitSplitEnqueueWARequired(getDevice().getHardwareInfo());
|
||||
auto bcsSplit = HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily)->isBlitSplitEnqueueWARequired(getDevice().getHardwareInfo()) &&
|
||||
CommandQueue::isBlitSplitEnabled();
|
||||
|
||||
if (DebugManager.flags.SplitBcsCopy.get() != -1) {
|
||||
bcsSplit = DebugManager.flags.SplitBcsCopy.get();
|
||||
|
||||
@@ -17,4 +17,8 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommandQueue::isBlitSplitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -306,6 +306,8 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenCheckIsSplitEnqueueBlit
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.SplitBcsCopy.set(1);
|
||||
auto *cmdQHw = static_cast<CommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
VariableBackup<UltHwConfig> backup{&ultHwConfig};
|
||||
ultHwConfig.useBlitSplit = true;
|
||||
{
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
@@ -331,6 +333,14 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenCheckIsSplitEnqueueBlit
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
}
|
||||
{
|
||||
DebugManager.flags.SplitBcsCopy.set(-1);
|
||||
ultHwConfig.useBlitSplit = false;
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
}
|
||||
}
|
||||
|
||||
char hostPtr[16 * MemoryConstants::megaByte];
|
||||
|
||||
@@ -19,4 +19,8 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return ultHwConfig.useWaitForTimestamps;
|
||||
}
|
||||
|
||||
bool CommandQueue::isBlitSplitEnabled() {
|
||||
return ultHwConfig.useBlitSplit;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -895,6 +895,10 @@ TEST(CommandQueueTest, whenCheckEngineTimestampWaitEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CommandQueue::isTimestampWaitEnabled());
|
||||
}
|
||||
|
||||
TEST(CommandQueueTest, whenCheckBlitSplitEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CommandQueue::isBlitSplitEnabled());
|
||||
}
|
||||
|
||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||
EXPECT_NE(nullptr, platformsImpl);
|
||||
platformsDestructor();
|
||||
|
||||
Reference in New Issue
Block a user