diff --git a/projects/clr/hipamd/src/hip_fatbin.cpp b/projects/clr/hipamd/src/hip_fatbin.cpp index 722e8b2c23..cf5e9fbcba 100644 --- a/projects/clr/hipamd/src/hip_fatbin.cpp +++ b/projects/clr/hipamd/src/hip_fatbin.cpp @@ -352,18 +352,13 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vector> compiled_co; // code object cache + comgr_helper::ComgrDataSetUniqueHandle spirv_data_set; + comgr_helper::ComgrDataUniqueHandle spirv_data; - auto compile_spv_bitcode = [&]() { - comgr_helper::ComgrDataSetUniqueHandle spirv_data_set; - comgr_helper::ComgrDataUniqueHandle spirv_data; - comgr_helper::ComgrActionInfoUniqueHandle action; - + auto get_spirv_data = [&]() { if (comgr_status = spirv_data_set.Create(); comgr_status != AMD_COMGR_STATUS_SUCCESS) { LogError("Failed to create SPIRV Data set"); return; @@ -396,23 +391,7 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vectordevices()[0]->isa().targetId(); if (auto code_iter = compiled_co.find(target_id); code_iter != compiled_co.end()) { // We have already compiled for it, lets reuse the code object @@ -488,8 +465,8 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vector