mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Unify used flags in case of IR exclusion
Unifies usage of flags in case of IR exclusion from ocloc's output file. When -exclude_ir parameter is active, then internal options passed to IGC contain -exclude-ir-from-zebin to preserve consistency. Moreover, when only -exclude-ir-from-zebin is present, then -exclude_ir is also set. Related-To: NEO-6477 Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
617f65c285
commit
09eefb4968
@ -710,6 +710,8 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
}
|
||||
}
|
||||
|
||||
unifyExcludeIrFlags();
|
||||
|
||||
if (DebugManager.flags.OverrideRevision.get() != -1) {
|
||||
revisionId = static_cast<unsigned short>(DebugManager.flags.OverrideRevision.get());
|
||||
}
|
||||
@ -737,6 +739,16 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void OfflineCompiler::unifyExcludeIrFlags() {
|
||||
const auto excludeIrFromZebin{internalOptions.find(CompilerOptions::excludeIrFromZebin.data()) != std::string::npos};
|
||||
if (!excludeIr && excludeIrFromZebin) {
|
||||
excludeIr = true;
|
||||
} else if (excludeIr && !excludeIrFromZebin) {
|
||||
const std::string prefix{"-ze"};
|
||||
CompilerOptions::concatenateAppend(internalOptions, prefix + CompilerOptions::excludeIrFromZebin.data());
|
||||
}
|
||||
}
|
||||
|
||||
void OfflineCompiler::setStatelessToStatefullBufferOffsetFlag() {
|
||||
bool isStatelessToStatefulBufferOffsetSupported = true;
|
||||
if (!deviceName.empty()) {
|
||||
|
Reference in New Issue
Block a user