feature: Add logic to disable bindless addressing via AIL

Add mockable Device functions to get ReleaseHelper and AILConfiguration.

Resolves: NEO-12699

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2024-09-18 12:38:06 +00:00
committed by Compute-Runtime-Automation
parent 9a44ac6779
commit ebc19b4a70
21 changed files with 103 additions and 28 deletions

View File

@@ -1139,6 +1139,10 @@ ReleaseHelper *Device::getReleaseHelper() const {
return getRootDeviceEnvironment().getReleaseHelper();
}
AILConfiguration *Device::getAilConfigurationHelper() const {
return getRootDeviceEnvironment().getAILConfigurationHelper();
}
void Device::stopDirectSubmissionAndWaitForCompletion() {
for (auto &engine : allEngines) {
auto csr = engine.commandStreamReceiver;

View File

@@ -21,24 +21,25 @@
#include <mutex>
namespace NEO {
class AILConfiguration;
class BindlessHeapsHelper;
class BuiltIns;
class CompilerInterface;
class ExecutionEnvironment;
class CompilerProductHelper;
class Debugger;
class DebuggerL0;
class ExecutionEnvironment;
class GfxCoreHelper;
class GmmClientContext;
class GmmHelper;
class SyncBufferHandler;
enum class EngineGroupType : uint32_t;
class DebuggerL0;
class OSTime;
class SubDevice;
struct PhysicalDevicePciBusInfo;
class GfxCoreHelper;
class ProductHelper;
class CompilerProductHelper;
class ReleaseHelper;
class SubDevice;
class SyncBufferHandler;
class UsmMemAllocPoolsManager;
enum class EngineGroupType : uint32_t;
struct PhysicalDevicePciBusInfo;
struct SelectorCopyEngine : NonCopyableOrMovableClass {
std::atomic<bool> isMainUsed = false;
@@ -191,7 +192,8 @@ class Device : public ReferenceTrackedObject<Device> {
const GfxCoreHelper &getGfxCoreHelper() const;
const ProductHelper &getProductHelper() const;
const CompilerProductHelper &getCompilerProductHelper() const;
ReleaseHelper *getReleaseHelper() const;
MOCKABLE_VIRTUAL ReleaseHelper *getReleaseHelper() const;
MOCKABLE_VIRTUAL AILConfiguration *getAilConfigurationHelper() const;
ISAPoolAllocator &getIsaPoolAllocator() {
return isaPoolAllocator;
}

View File

@@ -50,7 +50,7 @@ Device *RootDevice::getRootDevice() const {
void RootDevice::createBindlessHeapsHelper() {
if (ApiSpecificConfig::getGlobalBindlessHeapConfiguration(this->getReleaseHelper()) && ApiSpecificConfig::getBindlessMode(this->getReleaseHelper())) {
if (ApiSpecificConfig::getGlobalBindlessHeapConfiguration(this->getReleaseHelper()) && ApiSpecificConfig::getBindlessMode(*this)) {
this->executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->createBindlessHeapsHelper(this, getNumGenericSubDevices() > 1);
}
}