feature: Add debug/release variable prefixes

Resolves:  NEO-6357
Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
John Falkowski
2023-07-20 05:54:03 +00:00
committed by Compute-Runtime-Automation
parent 6fca8ee195
commit ec95d9314a
24 changed files with 1363 additions and 67 deletions

View File

@@ -10,7 +10,12 @@
#include "opencl/source/os_interface/ocl_reg_path.h"
#include <string>
#include <vector>
namespace NEO {
std::vector<const char *> validClPrefixes;
std::vector<NEO::DebugVarPrefix> validClPrefixTypes;
bool ApiSpecificConfig::isStatelessCompressionSupported() {
return true;
}
@@ -50,4 +55,20 @@ uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) {
const char *ApiSpecificConfig::getRegistryPath() {
return oclRegPath;
}
void ApiSpecificConfig::initPrefixes() {
validClPrefixes.push_back("NEO_OCL_");
validClPrefixes.push_back("NEO_");
validClPrefixes.push_back("");
validClPrefixTypes.push_back(DebugVarPrefix::Neo_Ocl);
validClPrefixTypes.push_back(DebugVarPrefix::Neo);
validClPrefixTypes.push_back(DebugVarPrefix::None);
}
const std::vector<const char *> &ApiSpecificConfig::getPrefixStrings() {
return validClPrefixes;
}
const std::vector<DebugVarPrefix> &ApiSpecificConfig::getPrefixTypes() {
return validClPrefixTypes;
}
} // namespace NEO

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/command_stream/preemption.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/os_interface/os_interface.h"
@@ -110,6 +111,8 @@ class MockRegistryReader : public SettingsReader {
public:
std::string nameString;
std::string versionString;
std::string getSetting(const char *settingName, const std::string &value, DebugVarPrefix &type) override { return ""; };
std::string getSetting(const char *settingName, const std::string &value) override {
std::string key(settingName);
if (key == "HardwareInformation.AdapterString") {
@@ -131,8 +134,11 @@ class MockRegistryReader : public SettingsReader {
return value;
}
bool getSetting(const char *settingName, bool defaultValue, DebugVarPrefix &type) override { return defaultValue; };
bool getSetting(const char *settingName, bool defaultValue) override { return defaultValue; };
int64_t getSetting(const char *settingName, int64_t defaultValue, DebugVarPrefix &type) override { return defaultValue; };
int64_t getSetting(const char *settingName, int64_t defaultValue) override { return defaultValue; };
int32_t getSetting(const char *settingName, int32_t defaultValue, DebugVarPrefix &type) override { return defaultValue; };
int32_t getSetting(const char *settingName, int32_t defaultValue) override { return defaultValue; };
const char *appSpecificLocation(const std::string &name) override { return name.c_str(); };