P4 to Git Change 1717849 by gandryey@gera-w8 on 2018/12/07 18:26:42

SWDEV-162389 - Back out changelist 1717839 due to a weird link error in LiquidFlash for LC Windows build only

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#237 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#326 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#248 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#117 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#84 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#100 edit
이 커밋은 다음에 포함됨:
foreman
2018-12-07 18:41:56 -05:00
부모 03d5d4b485
커밋 fd43c4fbfd
12개의 변경된 파일95개의 추가작업 그리고 97개의 파일을 삭제
+6 -6
파일 보기
@@ -116,7 +116,7 @@ bool NullDevice::init() {
id < sizeof(Gfx9PlusSubDeviceInfo)/sizeof(AMDDeviceInfo); ++id) {
bool foundActive = false;
bool foundDuplicate = false;
uint gfxipVersion = GPU_ENABLE_LC ? pal::Gfx9PlusSubDeviceInfo[id].gfxipVersionLC_ :
uint gfxipVersion = IS_LIGHTNING ? pal::Gfx9PlusSubDeviceInfo[id].gfxipVersionLC_ :
pal::Gfx9PlusSubDeviceInfo[id].gfxipVersion_;
if (pal::Gfx9PlusSubDeviceInfo[id].targetName_[0] == '\0') {
@@ -127,7 +127,7 @@ bool NullDevice::init() {
for (uint i = 0; i < devices.size(); ++i) {
driverVersion = static_cast<amd::Device*>(devices[i])->info().driverVersion_;
if (driverVersion.find("PAL") != std::string::npos) {
uint gfxIpCurrent = GPU_ENABLE_LC ?
uint gfxIpCurrent = IS_LIGHTNING ?
static_cast<NullDevice*>(devices[i])->hwInfo()->gfxipVersionLC_ :
static_cast<NullDevice*>(devices[i])->hwInfo()->gfxipVersion_;
if (gfxIpCurrent == gfxipVersion) {
@@ -272,7 +272,7 @@ bool NullDevice::create(Pal::AsicRevision asicRevision, Pal::GfxIpLevel ipLevel,
info_.wavefrontWidth_ = (ipLevel >= Pal::GfxIpLevel::GfxIp10) ? 32 : 64;
if (settings().useLightning_) {
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
// create compilation object with cache support
int gfxipMajor = hwInfo_->gfxipVersionLC_ / 100;
int gfxipMinor = hwInfo_->gfxipVersionLC_ / 10 % 10;
@@ -516,7 +516,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
const static char* bristol = "Bristol Ridge";
::strcpy(info_.name_, bristol);
} else {
if (GPU_ENABLE_LC && hwInfo()->xnackEnabled_) {
if (IS_LIGHTNING && hwInfo()->xnackEnabled_) {
::snprintf(info_.name_, sizeof(info_.name_) - 1, "%s-xnack", hwInfo()->targetName_);
} else {
::strcpy(info_.name_, hwInfo()->targetName_);
@@ -610,7 +610,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
info_.globalMemChannelBankWidth_ = hwInfo()->memChannelBankWidth_;
info_.localMemSizePerCU_ = hwInfo()->localMemSizePerCU_;
info_.localMemBanks_ = hwInfo()->localMemBanks_;
info_.gfxipVersion_ = GPU_ENABLE_LC ? hwInfo()->gfxipVersionLC_ : hwInfo()->gfxipVersion_;
info_.gfxipVersion_ = IS_LIGHTNING ? hwInfo()->gfxipVersionLC_ : hwInfo()->gfxipVersion_;
info_.timeStampFrequency_ = 1000000;
info_.numAsyncQueues_ = numComputeRings;
@@ -936,7 +936,7 @@ bool Device::create(Pal::IDevice* device) {
}
if (settings().useLightning_) {
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
// create compilation object with cache support
int gfxipMajor = hwInfo()->gfxipVersionLC_ / 100;
int gfxipMinor = hwInfo()->gfxipVersionLC_ / 10 % 10;
+6 -6
파일 보기
@@ -10,11 +10,11 @@
#include "utils/options.hpp"
#include "acl.h"
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
#include "llvm/Support/AMDGPUMetadata.h"
typedef llvm::AMDGPU::HSAMD::Kernel::Metadata KernelMD;
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
#include <string>
#include <memory>
@@ -377,7 +377,7 @@ const LightningProgram& LightningKernel::prog() const {
return reinterpret_cast<const LightningProgram&>(prog_);
}
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
static const KernelMD* FindKernelMetadata(const CodeObjectMD* programMD, const std::string& name) {
for (const KernelMD& kernelMD : programMD->mKernels) {
if (kernelMD.mName == name) {
@@ -386,10 +386,10 @@ static const KernelMD* FindKernelMetadata(const CodeObjectMD* programMD, const s
}
return nullptr;
}
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
flags_.internalKernel_ =
(compileOptions_.find("-cl-internal-kernel") != std::string::npos) ? true : false;
@@ -519,7 +519,7 @@ bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
waveLimiter_.enable();
*/
#endif // defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
return true;
}
+9 -9
파일 보기
@@ -19,12 +19,12 @@
#include "hsa.h"
#include "hsa_ext_image.h"
#include "amd_hsa_loader.hpp"
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
#include "llvm/Support/AMDGPUMetadata.h"
#include "driver/AmdCompiler.h"
#include "libraries.amdgcn.inc"
#include "gelf.h"
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
namespace pal {
@@ -375,7 +375,7 @@ hsa_isa_t PALHSALoaderContext::IsaFromName(const char* name) {
}
bool PALHSALoaderContext::IsaSupportedByAgent(hsa_agent_t agent, hsa_isa_t isa) {
uint32_t gfxipVersion = GPU_ENABLE_LC ?
uint32_t gfxipVersion = IS_LIGHTNING ?
program_->dev().hwInfo()->gfxipVersionLC_ :
program_->dev().hwInfo()->gfxipVersion_;
uint32_t majorSrc = gfxipVersion / 10;
@@ -546,7 +546,7 @@ hsa_status_t PALHSALoaderContext::SamplerDestroy(hsa_agent_t agent,
return HSA_STATUS_SUCCESS;
}
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
static hsa_status_t GetKernelNamesCallback(hsa_executable_t hExec, hsa_executable_symbol_t hSymbol,
void* data) {
@@ -575,20 +575,20 @@ static hsa_status_t GetKernelNamesCallback(hsa_executable_t hExec, hsa_executabl
return HSA_STATUS_SUCCESS;
}
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
bool LightningProgram::createBinary(amd::option::Options* options) {
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
if (!clBinary()->createElfBinary(options->oVariables->BinEncrypt, type())) {
LogError("Failed to create ELF binary image!");
return false;
}
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
return true;
}
bool LightningProgram::setKernels(amd::option::Options* options, void* binary, size_t binSize) {
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
hsa_agent_t agent;
agent.handle = 1;
@@ -654,7 +654,7 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
}
DestroySegmentCpuAccess();
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER)
return true;
}
+1 -1
파일 보기
@@ -439,7 +439,7 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
#endif
}
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#if defined(WITH_LIGHTNING_COMPILER)
switch (palProp.gfxLevel) {
case Pal::GfxIpLevel::GfxIp10_1:
case Pal::GfxIpLevel::GfxIp10: