From f8f6bc16a1657e0b954687bff5bd066463e7bd2b Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Thu, 30 Jul 2020 17:50:49 -0400 Subject: [PATCH] SWDEV-246565 - Remove passing -msram-ecc to Comgr Change-Id: I1604a0014186a5779561da3ec3eefec65aff5c37 --- rocclr/device/device.hpp | 2 -- rocclr/device/devprogram.cpp | 13 ++----------- rocclr/device/pal/paldevice.cpp | 4 +--- rocclr/device/rocm/rocdevice.cpp | 15 +-------------- 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/rocclr/device/device.hpp b/rocclr/device/device.hpp index bef896de03..7b3a5d6328 100755 --- a/rocclr/device/device.hpp +++ b/rocclr/device/device.hpp @@ -497,8 +497,6 @@ struct Info : public amd::EmbeddedObject { uint32_t numRTCUs_; //! Thread trace enable uint32_t threadTraceEnable_; - //! ECC protected GPRs support (only available Vega20+) - uint32_t sramEccEnabled_; //! Image pitch alignment for image2d_from_buffer uint32_t imagePitchAlignment_; diff --git a/rocclr/device/devprogram.cpp b/rocclr/device/devprogram.cpp index e81857d926..5d3061c616 100755 --- a/rocclr/device/devprogram.cpp +++ b/rocclr/device/devprogram.cpp @@ -1170,14 +1170,6 @@ bool Program::linkImplLC(amd::option::Options* options) { codegenOptions.insert(codegenOptions.end(), options->clangOptions.begin(), options->clangOptions.end()); - // TODO: SRAM ECC option will be removed when Target ID feature is fully implemented - if (device().info().sramEccEnabled_) { - codegenOptions.push_back("-msram-ecc"); - } - else { - codegenOptions.push_back("-mno-sram-ecc"); - } - // Set whole program mode codegenOptions.push_back("-mllvm"); codegenOptions.push_back("-amdgpu-internalize-symbols"); @@ -2476,8 +2468,7 @@ bool Program::FindGlobalVarSize(void* binary, size_t binSize) { } if (!createKernelMetadataMap()) { - buildLog_ += - "Error: create kernel metadata map using COMgr\n"; + buildLog_ += "Error: create kernel metadata map using COMgr\n"; return false; } @@ -2562,7 +2553,7 @@ bool Program::getSymbolsFromCodeObj(std::vector* var_names, amd_com sym_info.sym_type = sym_type; sym_info.var_names = var_names; - /* Iterate through list of symbols */ + /* Iterate through list of symbols */ status = amd::Comgr::iterate_symbols(dataObject, getSymbolFromModule, &sym_info); if (status != AMD_COMGR_STATUS_SUCCESS) { buildLog_ += "COMGR: Cannot iterate comgr symbols \n"; diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index 52d6571c44..18c715ef7b 100755 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -532,8 +532,6 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, info_.maxConstantBufferSize_ = info_.maxMemAllocSize_; info_.maxConstantArgs_ = MaxConstArguments; - info_.sramEccEnabled_ = palProp.gfxipProperties.shaderCore.flags.eccProtectedGprs; - // Image support fields if (settings().imageSupport_) { info_.imageSupport_ = CL_TRUE; @@ -578,7 +576,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, if (hwInfo()->xnackEnabled_) { ::strcat(info_.name_, "+xnack"); } - if (info_.sramEccEnabled_) { + if (palProp.gfxipProperties.shaderCore.flags.eccProtectedGprs) { ::strcat(info_.name_, "+sram-ecc"); } ::strcpy(info_.targetId_, "amdgcn-amd-amdhsa--"); diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index f07152500a..d69fc20139 100755 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -970,22 +970,9 @@ bool Device::populateOCLDeviceConstants() { info_.gfxipMinor_ = deviceInfo_.gfxipMinor_; info_.gfxipStepping_ = deviceInfo_.gfxipStepping_; - // TODO: gfxipVersion_ and sramEccEnabled_ will be removed when Target ID - // feature is fully implemented + // TODO: gfxipVersion_ will be removed when Target ID feature is fully implemented info_.gfxipVersion_ = info_.gfxipMajor_ * 100 + info_.gfxipMinor_ * 10 + info_.gfxipStepping_; - if ((info_.gfxipMajor_ == 9) && (info_.gfxipMinor_ == 0)) { - switch (info_.gfxipStepping_) { - case 6: - case 8: - info_.sramEccEnabled_ = true; - break; - default: - info_.sramEccEnabled_ = false; - break; - } - } - char device_name[64] = {0}; if (HSA_STATUS_SUCCESS == hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_PRODUCT_NAME,