Add method to get internal copy engine

Related-To: LOCI-2010

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-03-20 18:31:26 +00:00
committed by Compute-Runtime-Automation
parent 35ff284944
commit 56b2686f0d
4 changed files with 17 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ class ClDevice : public BaseObject<_cl_device_id> {
EngineControl &getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage);
EngineControl &getDefaultEngine();
EngineControl &getInternalEngine();
EngineControl *getInternalCopyEngine();
std::atomic<uint32_t> &getSelectorCopyEngine();
MemoryManager *getMemoryManager() const;
GmmHelper *getGmmHelper() const;

View File

@@ -152,6 +152,16 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetWhenGetGpgpuEnginesThenR
EXPECT_EQ(aub_stream::ENGINE_RCS, engines[2].first);
}
GEN12LPTEST_F(HwHelperTestGen12Lp,
whenCallingGetInternalCopyEngineThenNullptrIsReturned) {
HardwareInfo hwInfo = *defaultHwInfo;
hwInfo.featureTable.ftrBcsInfo = 1;
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo, 0));
auto internalCopyEngine = device->getInternalCopyEngine();
EXPECT_EQ(internalCopyEngine, nullptr);
}
GEN12LPTEST_F(HwHelperTestGen12Lp, givenEvenContextCountRequiredWhenGetGpgpuEnginesIsCalledThenInsertAdditionalEngineAtTheEndIfNeeded) {
struct MockHwInfoConfig : HwInfoConfigHw<IGFX_UNKNOWN> {
MockHwInfoConfig() {}

View File

@@ -57,6 +57,7 @@ class Device : public ReferenceTrackedObject<Device> {
EngineControl &getEngine(uint32_t index);
EngineControl &getDefaultEngine();
EngineControl &getInternalEngine();
EngineControl *getInternalCopyEngine();
std::atomic<uint32_t> &getSelectorCopyEngine();
MemoryManager *getMemoryManager() const;
GmmHelper *getGmmHelper() const;

View File

@@ -20,4 +20,9 @@ EngineControl &Device::getInternalEngine() {
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
}
EngineControl *Device::getInternalCopyEngine() {
return nullptr;
}
} // namespace NEO