mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
feature: Enabling debug variables reader in ocloc
This allows for using debug variables in ocloc with a few by-design limitations : * debug var needs to be prefixed with NEO_OCLOC_ (when setting-up at runtime as environment variable or using .config file) * debug var needs to be tagged with S_OCLOC scope (at compile time, in debug_variable .inl files) Related-To: NEO-14473 Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
09c9b555f9
commit
72ae27d51e
@@ -1,24 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_reg_path.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/utilities/debug_settings_reader_creator.h"
|
||||
#include "shared/source/utilities/stackvec.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <DebugFunctionalityLevel debugLevel>
|
||||
DebugSettingsManager<debugLevel>::DebugSettingsManager(const char *registryPath) {
|
||||
StackVec<const char *, 4> validOclocPrefixes;
|
||||
StackVec<NEO::DebugVarPrefix, 4> validOclocPrefixTypes;
|
||||
|
||||
void translateDebugSettings(DebugVariables &debugVariables) {
|
||||
}
|
||||
|
||||
template <DebugFunctionalityLevel debugLevel>
|
||||
DebugSettingsManager<debugLevel>::~DebugSettingsManager() {
|
||||
readerImpl.reset();
|
||||
};
|
||||
void ApiSpecificConfig::initPrefixes() {
|
||||
validOclocPrefixes = {"NEO_OCLOC_"};
|
||||
validOclocPrefixTypes = {DebugVarPrefix::neoOcloc};
|
||||
}
|
||||
|
||||
// Global Debug Settings Manager
|
||||
DebugSettingsManager<globalDebugFunctionalityLevel> debugManager("");
|
||||
const StackVec<const char *, 4> &ApiSpecificConfig::getPrefixStrings() {
|
||||
return validOclocPrefixes;
|
||||
}
|
||||
|
||||
const StackVec<DebugVarPrefix, 4> &ApiSpecificConfig::getPrefixTypes() {
|
||||
return validOclocPrefixTypes;
|
||||
}
|
||||
|
||||
bool isDebugKeysReadEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
DebugSettingsManager<globalDebugFunctionalityLevel> debugManager(Ocloc::oclocRegPath);
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user