diff --git a/opencl/source/utilities/logger.cpp b/opencl/source/utilities/logger.cpp index d36c138801..2e9d2da5b8 100644 --- a/opencl/source/utilities/logger.cpp +++ b/opencl/source/utilities/logger.cpp @@ -335,6 +335,8 @@ const char *FileLogger::getAllocationTypeString(GraphicsAllocation c return "DEBUG_SBA_TRACKING_BUFFER"; case GraphicsAllocation::AllocationType::DEBUG_MODULE_AREA: return "DEBUG_MODULE_AREA"; + case GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE: + return "WORK_PARTITION_SURFACE"; default: return "ILLEGAL_VALUE"; } diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp index 4f4874ad2e..ded61bb89d 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -723,6 +723,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe GraphicsAllocation::AllocationType::KERNEL_ISA_INTERNAL, GraphicsAllocation::AllocationType::PRIVATE_SURFACE, GraphicsAllocation::AllocationType::SCRATCH_SURFACE, + GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, GraphicsAllocation::AllocationType::BUFFER, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED, diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp index 343e77d8ab..adbf8257ae 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -21,6 +21,8 @@ #include "shared/source/utilities/tag_allocator.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" +#include "shared/test/common/mocks/ult_device_factory.h" +#include "shared/test/common/test_macros/test_checks_shared.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/platform/platform.h" @@ -1231,6 +1233,78 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugPauseThreadWhenTerminatingAtSecond EXPECT_EQ(1u, confirmationCounter); } +HWTEST_F(CommandStreamReceiverTest, givenDebugFlagWhenCreatingCsrThenSetEnableStaticPartitioningAccordingly) { + DebugManagerStateRestore restore{}; + { + MockDevice device{}; + EXPECT_FALSE(device.getUltCommandStreamReceiver().staticWorkPartitioningEnabled); + } + { + DebugManager.flags.EnableStaticPartitioning.set(0); + MockDevice device{}; + EXPECT_FALSE(device.getUltCommandStreamReceiver().staticWorkPartitioningEnabled); + } + { + DebugManager.flags.EnableStaticPartitioning.set(1); + MockDevice device{}; + EXPECT_TRUE(device.getUltCommandStreamReceiver().staticWorkPartitioningEnabled); + } +} + +HWTEST_F(CommandStreamReceiverTest, whenCreatingWorkPartitionAllocationThenInitializeContentsWithCopyEngine) { + REQUIRE_BLITTER_OR_SKIP(defaultHwInfo.get()); + DebugManagerStateRestore restore{}; + DebugManager.flags.EnableStaticPartitioning.set(0); + + constexpr size_t subDeviceCount = 3; + UltDeviceFactory deviceFactory{1, subDeviceCount}; + MockDevice &rootDevice = *deviceFactory.rootDevices[0]; + rootDevice.getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true; + rootDevice.getRootDeviceEnvironment().getMutableHardwareInfo()->featureTable.ftrBcsInfo = 1; + UltCommandStreamReceiver &csr = rootDevice.getUltCommandStreamReceiver(); + UltCommandStreamReceiver *bcsCsrs[] = { + reinterpret_cast *>(rootDevice.getDeviceById(0)->getEngine(aub_stream::ENGINE_BCS, false, false).commandStreamReceiver), + reinterpret_cast *>(rootDevice.getDeviceById(1)->getEngine(aub_stream::ENGINE_BCS, false, false).commandStreamReceiver), + reinterpret_cast *>(rootDevice.getDeviceById(2)->getEngine(aub_stream::ENGINE_BCS, false, false).commandStreamReceiver), + }; + const size_t bcsStarts[] = { + bcsCsrs[0]->commandStream.getUsed(), + bcsCsrs[1]->commandStream.getUsed(), + bcsCsrs[2]->commandStream.getUsed(), + }; + + csr.staticWorkPartitioningEnabled = true; + EXPECT_TRUE(csr.createWorkPartitionAllocation(rootDevice)); + EXPECT_NE(nullptr, csr.getWorkPartitionAllocation()); + + EXPECT_LT(bcsStarts[0], bcsCsrs[0]->commandStream.getUsed()); + EXPECT_LT(bcsStarts[1], bcsCsrs[1]->commandStream.getUsed()); + EXPECT_LT(bcsStarts[2], bcsCsrs[2]->commandStream.getUsed()); +} + +HWTEST_F(CommandStreamReceiverTest, givenFailingMemoryManagerWhenCreatingWorkPartitionAllocationThenReturnFalse) { + struct FailingMemoryManager : OsAgnosticMemoryManager { + using OsAgnosticMemoryManager::OsAgnosticMemoryManager; + GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) override { + return nullptr; + } + }; + + DebugManagerStateRestore restore{}; + DebugManager.flags.EnableStaticPartitioning.set(0); + UltDeviceFactory deviceFactory{1, 2}; + MockDevice &rootDevice = *deviceFactory.rootDevices[0]; + UltCommandStreamReceiver &csr = rootDevice.getUltCommandStreamReceiver(); + + ExecutionEnvironment &executionEnvironment = *deviceFactory.rootDevices[0]->executionEnvironment; + executionEnvironment.memoryManager = std::make_unique(executionEnvironment); + + csr.staticWorkPartitioningEnabled = true; + DebugManager.flags.EnableStaticPartitioning.set(1); + EXPECT_FALSE(csr.createWorkPartitionAllocation(rootDevice)); + EXPECT_EQ(nullptr, csr.getWorkPartitionAllocation()); +} + class CommandStreamReceiverWithAubSubCaptureTest : public CommandStreamReceiverTest, public ::testing::WithParamInterface> {}; diff --git a/opencl/test/unit_test/device/device_tests.cpp b/opencl/test/unit_test/device/device_tests.cpp index df8d6a931e..32370a64ac 100644 --- a/opencl/test/unit_test/device/device_tests.cpp +++ b/opencl/test/unit_test/device/device_tests.cpp @@ -331,6 +331,48 @@ HWTEST_F(DeviceTest, givenDeviceWhenAskingForDefaultEngineThenReturnValidValue) EXPECT_FALSE(osContext->isLowPriority()); } +HWTEST_F(DeviceTest, givenDebugFlagWhenCreatingRootDeviceWithSubDevicesThenWorkPartitionAllocationIsCreatedForRootDevice) { + DebugManagerStateRestore restore{}; + { + UltDeviceFactory deviceFactory{1, 2}; + EXPECT_EQ(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[1]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } + { + DebugManager.flags.EnableStaticPartitioning.set(0); + UltDeviceFactory deviceFactory{1, 2}; + EXPECT_EQ(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[1]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } + { + DebugManager.flags.EnableStaticPartitioning.set(1); + UltDeviceFactory deviceFactory{1, 2}; + EXPECT_NE(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + EXPECT_EQ(nullptr, deviceFactory.subDevices[1]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } +} + +HWTEST_F(DeviceTest, givenDebugFlagWhenCreatingRootDeviceWithoutSubDevicesThenWorkPartitionAllocationIsNotCreated) { + DebugManagerStateRestore restore{}; + { + UltDeviceFactory deviceFactory{1, 1}; + EXPECT_EQ(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } + { + DebugManager.flags.EnableStaticPartitioning.set(0); + UltDeviceFactory deviceFactory{1, 1}; + EXPECT_EQ(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } + { + DebugManager.flags.EnableStaticPartitioning.set(1); + UltDeviceFactory deviceFactory{1, 1}; + EXPECT_EQ(nullptr, deviceFactory.rootDevices[0]->getDefaultEngine().commandStreamReceiver->getWorkPartitionAllocation()); + } +} + TEST(DeviceCreation, givenFtrSimulationModeFlagTrueWhenNoOtherSimulationFlagsArePresentThenIsSimulationReturnsTrue) { HardwareInfo hwInfo = *defaultHwInfo; hwInfo.featureTable.ftrSimulationMode = true; diff --git a/opencl/test/unit_test/libult/ult_command_stream_receiver.h b/opencl/test/unit_test/libult/ult_command_stream_receiver.h index 8982651c94..de0a75e980 100644 --- a/opencl/test/unit_test/libult/ult_command_stream_receiver.h +++ b/opencl/test/unit_test/libult/ult_command_stream_receiver.h @@ -50,6 +50,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw, publ using BaseClass::requiresInstructionCacheFlush; using BaseClass::rootDeviceIndex; using BaseClass::sshState; + using BaseClass::staticWorkPartitioningEnabled; using BaseClass::wasSubmittedToSingleSubdevice; using BaseClass::CommandStreamReceiver::bindingTableBaseAddressRequired; using BaseClass::CommandStreamReceiver::checkForNewResources; diff --git a/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl b/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl index 079f82f736..dbc58665df 100644 --- a/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl +++ b/opencl/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.inl @@ -212,6 +212,7 @@ static const GraphicsAllocation::AllocationType allocationTypesWith32BitAnd64KbP GraphicsAllocation::AllocationType::BUFFER_COMPRESSED, GraphicsAllocation::AllocationType::PIPE, GraphicsAllocation::AllocationType::SCRATCH_SURFACE, + GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, GraphicsAllocation::AllocationType::PRIVATE_SURFACE, GraphicsAllocation::AllocationType::PRINTF_SURFACE, GraphicsAllocation::AllocationType::CONSTANT_SURFACE, @@ -966,6 +967,7 @@ static const GraphicsAllocation::AllocationType allocationHaveToBeForcedTo48Bit[ GraphicsAllocation::AllocationType::LINEAR_STREAM, GraphicsAllocation::AllocationType::MCS, GraphicsAllocation::AllocationType::SCRATCH_SURFACE, + GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, GraphicsAllocation::AllocationType::SHARED_CONTEXT_IMAGE, GraphicsAllocation::AllocationType::SHARED_IMAGE, GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY, diff --git a/opencl/test/unit_test/test_files/igdrcl.config b/opencl/test/unit_test/test_files/igdrcl.config index c0e5f5cc77..cc13a2e6c9 100644 --- a/opencl/test/unit_test/test_files/igdrcl.config +++ b/opencl/test/unit_test/test_files/igdrcl.config @@ -212,4 +212,5 @@ EnableHostPointerImport = -1 EnableHostUsmSupport = -1 ForceBtpPrefetchMode = -1 OverrideProfilingTimerResolution = -1 -PreferCopyEngineForCopyBufferToBuffer = -1 \ No newline at end of file +PreferCopyEngineForCopyBufferToBuffer = -1 +EnableStaticPartitioning = -1 diff --git a/opencl/test/unit_test/utilities/file_logger_tests.cpp b/opencl/test/unit_test/utilities/file_logger_tests.cpp index fa7836bbed..85cf18d015 100644 --- a/opencl/test/unit_test/utilities/file_logger_tests.cpp +++ b/opencl/test/unit_test/utilities/file_logger_tests.cpp @@ -927,6 +927,7 @@ AllocationTypeTestCase allocationTypeValues[] = { {GraphicsAllocation::AllocationType::PRIVATE_SURFACE, "PRIVATE_SURFACE"}, {GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER, "PROFILING_TAG_BUFFER"}, {GraphicsAllocation::AllocationType::SCRATCH_SURFACE, "SCRATCH_SURFACE"}, + {GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, "WORK_PARTITION_SURFACE"}, {GraphicsAllocation::AllocationType::SHARED_BUFFER, "SHARED_BUFFER"}, {GraphicsAllocation::AllocationType::SHARED_CONTEXT_IMAGE, "SHARED_CONTEXT_IMAGE"}, {GraphicsAllocation::AllocationType::SHARED_IMAGE, "SHARED_IMAGE"}, diff --git a/shared/source/aub/aub_helper.h b/shared/source/aub/aub_helper.h index 6550889e5b..987078dff0 100644 --- a/shared/source/aub/aub_helper.h +++ b/shared/source/aub/aub_helper.h @@ -24,6 +24,7 @@ class AubHelper : public NonCopyableOrMovableClass { case GraphicsAllocation::AllocationType::KERNEL_ISA_INTERNAL: case GraphicsAllocation::AllocationType::PRIVATE_SURFACE: case GraphicsAllocation::AllocationType::SCRATCH_SURFACE: + case GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE: case GraphicsAllocation::AllocationType::BUFFER: case GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY: case GraphicsAllocation::AllocationType::BUFFER_COMPRESSED: diff --git a/shared/source/command_stream/command_stream_receiver.cpp b/shared/source/command_stream/command_stream_receiver.cpp index 84f7a52fee..616b4b3914 100644 --- a/shared/source/command_stream/command_stream_receiver.cpp +++ b/shared/source/command_stream/command_stream_receiver.cpp @@ -48,6 +48,10 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi indirectHeap[i] = nullptr; } internalAllocationStorage = std::make_unique(*this); + + if (DebugManager.flags.EnableStaticPartitioning.get() == 1) { + this->staticWorkPartitioningEnabled = true; + } } CommandStreamReceiver::~CommandStreamReceiver() { @@ -226,6 +230,11 @@ void CommandStreamReceiver::cleanupResources() { getMemoryManager()->freeGraphicsMemory(clearColorAllocation); clearColorAllocation = nullptr; } + + if (workPartitionAllocation) { + getMemoryManager()->freeGraphicsMemory(workPartitionAllocation); + workPartitionAllocation = nullptr; + } } bool CommandStreamReceiver::waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMicroseconds, uint32_t taskCountToWait) { @@ -474,6 +483,37 @@ bool CommandStreamReceiver::initializeTagAllocation() { return true; } +bool CommandStreamReceiver::createWorkPartitionAllocation(const Device &device) { + if (!staticWorkPartitioningEnabled) { + return false; + } + UNRECOVERABLE_IF(device.getNumAvailableDevices() < 2); + + AllocationProperties properties{this->rootDeviceIndex, true, 4096u, GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, true, false, deviceBitfield}; + this->workPartitionAllocation = getMemoryManager()->allocateGraphicsMemoryWithProperties(properties); + if (this->workPartitionAllocation == nullptr) { + return false; + } + + for (uint32_t deviceIndex = 0; deviceIndex < deviceBitfield.size(); deviceIndex++) { + if (!deviceBitfield.test(deviceIndex)) { + continue; + } + + const uint32_t copySrc = deviceIndex; + const Vec3 copySrcSize = {sizeof(copySrc), 1, 1}; + DeviceBitfield copyBitfield{}; + copyBitfield.set(deviceIndex); + BlitOperationResult blitResult = BlitHelper::blitMemoryToAllocationBanks(device, workPartitionAllocation, 0, ©Src, copySrcSize, copyBitfield); + + if (blitResult != BlitOperationResult::Success) { + return false; + } + } + + return true; +} + bool CommandStreamReceiver::createGlobalFenceAllocation() { auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); if (!HwHelper::get(hwInfo->platform.eRenderCoreFamily).isFenceAllocationRequired(*hwInfo)) { diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index f5b97d2792..dabd8e7bd1 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -142,6 +142,7 @@ class CommandStreamReceiver { GraphicsAllocation *allocateDebugSurface(size_t size); GraphicsAllocation *getPreemptionAllocation() const { return preemptionAllocation; } GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; } + GraphicsAllocation *getWorkPartitionAllocation() const { return workPartitionAllocation; } void requestStallingPipeControlOnNextFlush() { stallingPipeControlOnNextFlushRequired = true; } bool isStallingPipeControlOnNextFlushRequired() const { return stallingPipeControlOnNextFlushRequired; } @@ -168,6 +169,7 @@ class CommandStreamReceiver { void setExperimentalCmdBuffer(std::unique_ptr &&cmdBuffer); bool initializeTagAllocation(); + MOCKABLE_VIRTUAL bool createWorkPartitionAllocation(const Device &device); MOCKABLE_VIRTUAL bool createGlobalFenceAllocation(); MOCKABLE_VIRTUAL bool createPreemptionAllocation(); MOCKABLE_VIRTUAL bool createPerDssBackedBuffer(Device &device); @@ -273,6 +275,7 @@ class CommandStreamReceiver { GraphicsAllocation *debugSurface = nullptr; GraphicsAllocation *perDssBackedBuffer = nullptr; GraphicsAllocation *clearColorAllocation = nullptr; + GraphicsAllocation *workPartitionAllocation = nullptr; IndirectHeap *indirectHeap[IndirectHeap::NUM_TYPES]; OsContext *osContext = nullptr; @@ -318,6 +321,7 @@ class CommandStreamReceiver { bool lastVmeSubslicesConfig = false; bool stallingPipeControlOnNextFlushRequired = false; bool timestampPacketWriteEnabled = false; + bool staticWorkPartitioningEnabled = false; bool nTo1SubmissionModelEnabled = false; bool lastSpecialPipelineSelectMode = false; bool requiresInstructionCacheFlush = false; diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 8ca839a08c..7c871ba17f 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -224,6 +224,7 @@ DECLARE_DEBUG_VARIABLE(int64_t, ForceNonSystemMemoryPlacement, 0, "0: default, DECLARE_DEBUG_VARIABLE(int64_t, DisableIndirectAccess, -1, "0: default, 0: Indirect access for L0 kernels is enabled, 1: Read IGC experimental properties to determine whether indirect access is required") DECLARE_DEBUG_VARIABLE(int32_t, UseVmBind, 0, "Use new residency model on Linux (requires kernel support), -1: default, 0: disabled, 1: enabled") DECLARE_DEBUG_VARIABLE(int32_t, PassBoundBOToExec, -1, "Pass bound BOs to exec call to keep dependencies") +DECLARE_DEBUG_VARIABLE(int32_t, EnableStaticPartitioning, -1, "Divide workload into partitions during dispatch, -1: default, 0: disabled, 1: enabled") DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger") DECLARE_DEBUG_VARIABLE(bool, ReturnRawGpuTimestamps, false, "Driver returns raw GPU tiemstamps instead of calculated ones.") DECLARE_DEBUG_VARIABLE(bool, ForcePerDssBackedBufferProgramming, false, "Always program per-DSS memory backed buffer in preamble") diff --git a/shared/source/device/root_device.cpp b/shared/source/device/root_device.cpp index d5d3509c3f..8bcd98685c 100644 --- a/shared/source/device/root_device.cpp +++ b/shared/source/device/root_device.cpp @@ -124,6 +124,7 @@ void RootDevice::initializeRootCommandStreamReceiver() { rootCommandStreamReceiver->setupContext(*osContext); rootCommandStreamReceiver->initializeTagAllocation(); rootCommandStreamReceiver->createGlobalFenceAllocation(); + rootCommandStreamReceiver->createWorkPartitionAllocation(*this); commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver)); EngineControl engine{commandStreamReceivers.back().get(), osContext}; diff --git a/shared/source/helpers/blit_commands_helper.h b/shared/source/helpers/blit_commands_helper.h index e277502c49..4b93f1da98 100644 --- a/shared/source/helpers/blit_commands_helper.h +++ b/shared/source/helpers/blit_commands_helper.h @@ -103,6 +103,8 @@ extern BlitMemoryToAllocationFunc blitAllocationToMemory; struct BlitHelper { static BlitOperationResult blitMemoryToAllocation(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size); + static BlitOperationResult blitMemoryToAllocationBanks(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, + Vec3 size, DeviceBitfield memoryBanks); static BlitOperationResult blitAllocationToMemory(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, Vec3 size); }; diff --git a/shared/source/helpers/blit_commands_helper_extra.cpp b/shared/source/helpers/blit_commands_helper_extra.cpp index f556ea6bb1..d697337f7f 100644 --- a/shared/source/helpers/blit_commands_helper_extra.cpp +++ b/shared/source/helpers/blit_commands_helper_extra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,4 +14,9 @@ BlitOperationResult BlitHelper::blitMemoryToAllocation(const Device &device, Gra return BlitOperationResult::Unsupported; } +BlitOperationResult BlitHelper::blitMemoryToAllocationBanks(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr, + Vec3 size, DeviceBitfield memoryBanks) { + return BlitOperationResult::Unsupported; +} + } // namespace NEO diff --git a/shared/source/memory_manager/graphics_allocation.h b/shared/source/memory_manager/graphics_allocation.h index e4c9cdb776..8f551b4005 100644 --- a/shared/source/memory_manager/graphics_allocation.h +++ b/shared/source/memory_manager/graphics_allocation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -96,7 +96,8 @@ class GraphicsAllocation : public IDNode { DEBUG_CONTEXT_SAVE_AREA, DEBUG_SBA_TRACKING_BUFFER, DEBUG_MODULE_AREA, - UNIFIED_SHARED_MEMORY + UNIFIED_SHARED_MEMORY, + WORK_PARTITION_SURFACE, }; ~GraphicsAllocation() override; diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index 6ce69f29e1..10e3a6b6e3 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -282,6 +282,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo case GraphicsAllocation::AllocationType::PRINTF_SURFACE: case GraphicsAllocation::AllocationType::PRIVATE_SURFACE: case GraphicsAllocation::AllocationType::SCRATCH_SURFACE: + case GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE: case GraphicsAllocation::AllocationType::WRITE_COMBINED: allow64KbPages = true; allow32Bit = true; @@ -368,6 +369,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo case GraphicsAllocation::AllocationType::LINEAR_STREAM: case GraphicsAllocation::AllocationType::MCS: case GraphicsAllocation::AllocationType::SCRATCH_SURFACE: + case GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE: case GraphicsAllocation::AllocationType::SHARED_CONTEXT_IMAGE: case GraphicsAllocation::AllocationType::SHARED_IMAGE: case GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY: