Skip to content

Commit

Permalink
apply code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
VyacheslavLevytskyy committed Jan 30, 2025
1 parent 51425ea commit b529394
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ bool runSpirvBackend(Module *M, std::string &Result, std::string &ErrMsg,
return SPIRVTranslateModule(M, Result, ErrMsg, AllowExtNames, Opts);
}

bool runSpirvBackend(Module *M, std::ostream *OS, std::string &ErrMsg,
bool runSpirvBackend(Module *M, std::ostream &OS, std::string &ErrMsg,
const SPIRV::TranslatorOpts &TranslatorOpts) {
std::string Result;
bool Status = runSpirvBackend(M, Result, ErrMsg, TranslatorOpts);
if (Status && OS)
*OS << Result;
if (Status)
OS << Result;
return Status;
}

Expand Down Expand Up @@ -161,7 +161,7 @@ std::string translateLLVMIRToSPIRV(llvm::Module &module) {
if (const char *EnvIsBackend = std::getenv("TRITON_USE_SPIRV_BACKEND"))
llvm::StringRef(EnvIsBackend).getAsInteger(10, SpvTranslateMode);
auto success = SpvTranslateMode
? llvm::runSpirvBackend(&module, &OS, Err, SPIRVOpts)
? llvm::runSpirvBackend(&module, OS, Err, SPIRVOpts)
: llvm::writeSpirv(&module, SPIRVOpts, OS, Err);
#else
auto success = llvm::writeSpirv(&module, SPIRVOpts, OS, Err);
Expand Down

0 comments on commit b529394

Please sign in to comment.