fix: Better IR file format ext handling

This fix makes ocloc honor IR file format when picking
extension for the output file.
Additionally, this commit removes reduntant IR output when
compiling from IR.

Related-To: NEO-15876

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
Chodor, Jaroslaw
2025-09-15 14:51:08 +00:00
committed by Compute-Runtime-Automation
parent 84f7b538df
commit d8ef0aa99d
5 changed files with 61 additions and 4 deletions

View File

@@ -1769,7 +1769,7 @@ void OfflineCompiler::writeOutAllFiles() {
return;
}
if (irBinary && (this->inputCodeType != IGC::CodeType::spirV)) {
if (irBinary && (this->inputCodeType == IGC::CodeType::oclC)) {
std::string irOutputFileName = generateFilePathForIr(fileBase) + generateOptsSuffix();
argHelper->saveOutput(irOutputFileName, irBinary, irBinarySize);