P4 to Git Change 1586165 by gandryey@gera-w8 on 2018/07/26 18:11:39

SWDEV-79445 - OCL generic changes and code clean-up
	- Make sure RAVEN2 uses PAL path for offline devices

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#597 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#167 edit


[ROCm/clr commit: 2544968e15]
This commit is contained in:
foreman
2018-07-26 18:27:12 -04:00
parent 4fcd18fd5c
commit a2b006e769
2 changed files with 11 additions and 11 deletions
@@ -135,12 +135,10 @@ bool NullDevice::create(CALtarget target) {
assert((target >= CAL_TARGET_TAHITI) && (target != CAL_TARGET_SCRAPPER) &&
(target != CAL_TARGET_DEVASTATOR));
if ((GPU_ENABLE_PAL == 2) &&
(calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
calTarget_ >= CAL_TARGET_VEGA12)) {
return false;
if ((GPU_ENABLE_PAL == 2) && usePal()) {
return false;
}
// Force double if it could be supported
switch (target) {
case CAL_TARGET_PITCAIRN:
@@ -862,9 +860,7 @@ bool Device::create(CALuint ordinal, CALuint numOfDevices) {
calTarget_ = getAttribs().target;
hwInfo_ = &DeviceInfo[calTarget_];
if ((GPU_ENABLE_PAL == 2) &&
(calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
calTarget_ == CAL_TARGET_RAVEN2 || calTarget_ >= CAL_TARGET_VEGA12)) {
if ((GPU_ENABLE_PAL == 2) && usePal()) {
return false;
}
@@ -42,7 +42,6 @@ class NullDevice : public amd::Device {
aclCompiler* compiler() const { return compiler_; }
aclCompiler* hsaCompiler() const { return hsaCompiler_; }
public:
static bool init(void);
//! Construct a new identifier
@@ -111,8 +110,10 @@ class NullDevice : public amd::Device {
virtual void svmFree(void* ptr) const { return; }
protected:
CALtarget calTarget_; //!< GPU device identifier
const AMDDeviceInfo* hwInfo_; //!< Device HW info structure
bool usePal() const {
return (calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
calTarget_ == CAL_TARGET_RAVEN2 || calTarget_ >= CAL_TARGET_VEGA12);
}
//! Answer the question: "Should HSAIL Program be created?",
//! based on the given options.
@@ -125,6 +126,9 @@ class NullDevice : public amd::Device {
uint numComputeRings, //!< Number of compute rings
uint numComputeRingsRT //!< Number of RT compute rings
);
CALtarget calTarget_; //!< GPU device identifier
const AMDDeviceInfo* hwInfo_; //!< Device HW info structure
};
//! Forward declarations