diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp index ec5649d1e1..de9b53c9c1 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp @@ -645,8 +645,8 @@ bool Device::create() { const char* scheduler = nullptr; #if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY) + std::string sch = SchedulerSourceCode; if (settings().useLightning_) { - std::string sch = SchedulerSourceCode; scheduler = sch.c_str(); } // create compilation object with cache support