diff --git a/runtime/command_stream/aub_command_stream_receiver_hw.h b/runtime/command_stream/aub_command_stream_receiver_hw.h index 05ead52133..2119eb1ea4 100644 --- a/runtime/command_stream/aub_command_stream_receiver_hw.h +++ b/runtime/command_stream/aub_command_stream_receiver_hw.h @@ -111,8 +111,6 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw @@ -38,7 +37,7 @@ AUBCommandStreamReceiverHw::AUBCommandStreamReceiverHw(const Hardware UNRECOVERABLE_IF(nullptr == aubCenter); if (!aubCenter->getPhysicalAddressAllocator()) { - aubCenter->initPhysicalAddressAllocator(createPhysicalAddressAllocator()); + aubCenter->initPhysicalAddressAllocator(this->createPhysicalAddressAllocator()); } auto physicalAddressAllocator = aubCenter->getPhysicalAddressAllocator(); UNRECOVERABLE_IF(nullptr == physicalAddressAllocator); @@ -781,8 +780,7 @@ uint32_t AUBCommandStreamReceiverHw::getMemoryBankForGtt() const { } template -PhysicalAddressAllocator *AUBCommandStreamReceiverHw::createPhysicalAddressAllocator() { +PhysicalAddressAllocator *CommandStreamReceiverSimulatedCommonHw::createPhysicalAddressAllocator() { return new PhysicalAddressAllocator(); } - } // namespace OCLRT diff --git a/runtime/command_stream/command_stream_receiver_simulated_common_hw.h b/runtime/command_stream/command_stream_receiver_simulated_common_hw.h index d1056c127a..3b9bd69377 100644 --- a/runtime/command_stream/command_stream_receiver_simulated_common_hw.h +++ b/runtime/command_stream/command_stream_receiver_simulated_common_hw.h @@ -8,6 +8,7 @@ #pragma once #include "runtime/command_stream/command_stream_receiver_hw.h" #include "runtime/memory_manager/memory_banks.h" +#include "runtime/memory_manager/physical_address_allocator.h" namespace OCLRT { class GraphicsAllocation; @@ -19,5 +20,8 @@ class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw::TbxCommandStreamReceiverHw(const Hardware ExecutionEnvironment &executionEnvironment) : BaseClass(hwInfoIn, executionEnvironment) { - createPhysicalAddressAllocator(); + physicalAddressAllocator.reset(this->createPhysicalAddressAllocator()); ppgtt = std::make_unique::type>(physicalAddressAllocator.get()); ggtt = std::make_unique(physicalAddressAllocator.get()); @@ -418,10 +418,4 @@ template uint32_t TbxCommandStreamReceiverHw::getMemoryBankForGtt() const { return MemoryBanks::getBank(this->deviceIndex); } - -template -void TbxCommandStreamReceiverHw::createPhysicalAddressAllocator() { - physicalAddressAllocator = std::make_unique(); -} - } // namespace OCLRT diff --git a/runtime/gen10/aub_command_stream_receiver_gen10.cpp b/runtime/gen10/aub_command_stream_receiver_gen10.cpp index 47581bb397..3ffbfced19 100644 --- a/runtime/gen10/aub_command_stream_receiver_gen10.cpp +++ b/runtime/gen10/aub_command_stream_receiver_gen10.cpp @@ -23,4 +23,5 @@ void populateFactoryTable>() { } template class AUBCommandStreamReceiverHw; +template class CommandStreamReceiverSimulatedCommonHw; } // namespace OCLRT diff --git a/runtime/gen8/aub_command_stream_receiver_gen8.cpp b/runtime/gen8/aub_command_stream_receiver_gen8.cpp index c0d7cee078..80a7f9b603 100644 --- a/runtime/gen8/aub_command_stream_receiver_gen8.cpp +++ b/runtime/gen8/aub_command_stream_receiver_gen8.cpp @@ -23,4 +23,5 @@ void populateFactoryTable>() { } template class AUBCommandStreamReceiverHw; +template class CommandStreamReceiverSimulatedCommonHw; } // namespace OCLRT diff --git a/runtime/gen9/aub_command_stream_receiver_gen9.cpp b/runtime/gen9/aub_command_stream_receiver_gen9.cpp index 5a164567b0..c92e82e2da 100644 --- a/runtime/gen9/aub_command_stream_receiver_gen9.cpp +++ b/runtime/gen9/aub_command_stream_receiver_gen9.cpp @@ -23,4 +23,5 @@ void populateFactoryTable>() { } template class AUBCommandStreamReceiverHw; +template class CommandStreamReceiverSimulatedCommonHw; } // namespace OCLRT