Skip to content

Commit

Permalink
Fix running optimizeIR for CUDA (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggeorgakoudis authored Jan 17, 2025
1 parent 202a03b commit c11db51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/JitEngineDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,14 @@ JitEngineDevice<ImplT>::compileAndRun(
// internally runs it. For the rest of cases, that is CUDA or HIP with our own
// codegen instead of RTC, run the target-specific optimization pipeline to
// optimize the LLVM IR before handing over to codegen.
#if ENABLE_CUDA
optimizeIR(*JitModule, DeviceArch);
#elif ENABLE_HIP
if (!Config.ENV_PROTEUS_USE_HIP_RTC_CODEGEN)
optimizeIR(*JitModule, DeviceArch);
#else
#error "JitEngineDevice requires ENABLE_CUDA or ENABLE_HIP"
#endif

SmallString<4096> ModuleBuffer;
raw_svector_ostream ModuleBufferOS(ModuleBuffer);
Expand Down

0 comments on commit c11db51

Please sign in to comment.