diff --git a/rocclr/runtime/device/device.hpp b/rocclr/runtime/device/device.hpp index e03c49931c..4ba5ba0bac 100644 --- a/rocclr/runtime/device/device.hpp +++ b/rocclr/runtime/device/device.hpp @@ -1124,6 +1124,7 @@ class Device : public RuntimeObject { }; virtual Compiler* compiler() const = 0; + virtual Compiler* binCompiler() const { return compiler(); } Device(); virtual ~Device(); diff --git a/rocclr/runtime/device/gpu/gpudevice.hpp b/rocclr/runtime/device/gpu/gpudevice.hpp index cf5cc8b59b..9d89880962 100644 --- a/rocclr/runtime/device/gpu/gpudevice.hpp +++ b/rocclr/runtime/device/gpu/gpudevice.hpp @@ -42,6 +42,7 @@ class NullDevice : public amd::Device { aclCompiler* amdilCompiler() const { return compiler_; } aclCompiler* hsaCompiler() const { return hsaCompiler_; } aclCompiler* compiler() const { return hsaCompiler_; } + Compiler* binCompiler() const { return amdilCompiler(); } static bool init(void); diff --git a/rocclr/runtime/platform/program.cpp b/rocclr/runtime/platform/program.cpp index 336c95a805..6dd40e50aa 100644 --- a/rocclr/runtime/platform/program.cpp +++ b/rocclr/runtime/platform/program.cpp @@ -89,7 +89,7 @@ cl_int Program::addDeviceProgram(Device& device, const void* image, size_t lengt assert(symbol && "symbol not found"); std::string symName = std::string(symbol->str[bif::PRE]) + std::string(symbol->str[bif::POST]); size_t symSize = 0; - const void* opts = aclExtractSymbol(device.compiler(), binary, &symSize, aclCOMMENT, + const void* opts = aclExtractSymbol(device.binCompiler(), binary, &symSize, aclCOMMENT, symName.c_str(), &errorCode); // if we have options from binary and input options was not specified if (opts != NULL && emptyOptions) {