diff --git a/rocclr/runtime/device/gpu/gpukernel.cpp b/rocclr/runtime/device/gpu/gpukernel.cpp index 2e9c8446ad..da6a8b5f17 100644 --- a/rocclr/runtime/device/gpu/gpukernel.cpp +++ b/rocclr/runtime/device/gpu/gpukernel.cpp @@ -3605,11 +3605,11 @@ HSAILKernel::init(amd::hsa::loader::Symbol *sym, bool finalize) } acl_error error = ACL_SUCCESS; std::string openClKernelName = openclMangledName(name()); + flags_.internalKernel_ = (compileOptions_.find("-cl-internal-kernel") != + std::string::npos) ? true: false; //compile kernel down to ISA if (finalize) { std::string options(compileOptions_.c_str()); - flags_.internalKernel_ = (compileOptions_.find("-cl-internal-kernel") != - std::string::npos) ? true: false; options.append(" -just-kernel="); options.append(openClKernelName.c_str()); // Append an option so that we can selectively enable a SCOption on CZ