P4 to Git Change 1071796 by xcui@merged_opencl_jxcwin on 2014/08/29 17:10:04

EPR #404341 - disable OPenCL 2.0 for corssfire and multipe devices temporaraly, this is the OPENCL  changes.
	code review:
	http://ocltc.amd.com/reviews/r/5639/

	precheckin testing results:
	http://ocltc.amd.com:8111/viewModification.html?modId=38513&personal=true&init=1&tab=vcsModificationBuilds

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#458 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#132 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#277 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/include/cal/cal.h#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#98 edit
This commit is contained in:
foreman
2014-08-29 17:26:08 -04:00
szülő 87e6a3fa02
commit bc8b0dbc9c
5 fájl változott, egészen pontosan 17 új sor hozzáadva és 12 régi sor törölve
@@ -623,13 +623,6 @@ void Device::fillDeviceInfo(
info_.linkerAvailable_ = CL_TRUE;
info_.executionCapabilities_ = CL_EXEC_KERNEL;
if (settings().oclVersion_ >= OpenCL20) {
info_.svmCapabilities_ = CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
| CL_DEVICE_SVM_FINE_GRAIN_BUFFER;
if (settings().svmAtomics_) {
info_.svmCapabilities_ |= CL_DEVICE_SVM_ATOMICS;
}
}
info_.preferredPlatformAtomicAlignment_ = 0;
info_.preferredGlobalAtomicAlignment_ = 0;
info_.preferredLocalAtomicAlignment_ = 0;
@@ -713,6 +706,11 @@ void Device::fillDeviceInfo(
info_.printfBufferSize_ = PrintfDbg::WorkitemDebugSize * info().maxWorkGroupSize_;
if (settings().oclVersion_ >= OpenCL20) {
info_.svmCapabilities_ = CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
| CL_DEVICE_SVM_FINE_GRAIN_BUFFER;
if (settings().svmAtomics_) {
info_.svmCapabilities_ |= CL_DEVICE_SVM_ATOMICS;
}
// OpenCL2.0 device info fields
info_.maxWriteImageArgs_ = MaxReadWriteImage; //!< For compatibility
info_.maxReadWriteImageArgs_ = MaxReadWriteImage;
@@ -749,13 +747,14 @@ void Device::fillDeviceInfo(
extern const char* SchedulerSourceCode;
bool
Device::create(CALuint ordinal)
Device::create(CALuint ordinal, CALuint numOfDevices)
{
appProfile_.init();
// Open GSL device
bool reportOCL12Device = numOfDevices < 2 ? (OPENCL_VERSION < 200) : true;
if (!open(ordinal, appProfile_.enableHighPerformanceState(),
(appProfile_.reportAsOCL12Device() || (OPENCL_VERSION < 200)))) {
appProfile_.reportAsOCL12Device() || reportOCL12Device)) {
return false;
}
@@ -770,7 +769,7 @@ Device::create(CALuint ordinal)
#if cl_amd_open_video
, getVideoAttribs()
#endif // cl_amd_open_video
, appProfile_.reportAsOCL12Device()
, appProfile_.reportAsOCL12Device() || reportOCL12Device
)) {
return false;
}
@@ -1249,7 +1248,7 @@ Device::init()
for (; ordinal < numDevices; ++ordinal) {
// Create the GPU device object
Device *d = new Device();
result = (NULL != d) && d->create(ordinal);
result = (NULL != d) && d->create(ordinal, numDevices);
if (useDeviceList) {
result &= (requestedDevices.find(ordinal) != requestedDevices.end());
}
@@ -363,7 +363,8 @@ public:
//! Initialise a device (i.e. all parts of the constructor that could
//! potentially fail)
bool create(
CALuint ordinal //!< GPU device ordinal index. Starts from 0
CALuint ordinal, //!< GPU device ordinal index. Starts from 0
CALuint numOfDevices //!< number of GPU devices in the system
);
//! Destructor for the physical GPU device
@@ -287,6 +287,9 @@ Settings::create(
#if defined(_LP64)
oclVersion_ = reportAsOCL12Device ? OpenCL12 : XCONCAT(OpenCL,XCONCAT(OPENCL_MAJOR,OPENCL_MINOR));
#endif
if (calAttr.numOfVpu > 1) {
oclVersion_ = OpenCL12;
}
if (GPU_FORCE_OCL20_32BIT) {
force32BitOcl20_ = true;
oclVersion_ = reportAsOCL12Device ? OpenCL12 : XCONCAT(OpenCL,XCONCAT(OPENCL_MAJOR,OPENCL_MINOR));
@@ -237,6 +237,7 @@ typedef struct CALdeviceattribsRec {
CALuint64 vaStart; /**< VA start address */
CALuint64 vaEnd; /**< VA end address */
bool isWorkstation; /**< Whether Device is a Workstation/Server part */
CALuint numOfVpu; /**< number of vpu in the device*/
} CALdeviceattribs;
/** CAL device status */
@@ -154,6 +154,7 @@ CALGSLDevice::getAttribs_int(gsl::gsCtx* cs)
m_attribs.vaStart = static_cast<CALuint64>(m_adp->pAsicInfo->vaStart);
m_attribs.vaEnd = static_cast<CALuint64>(m_adp->pAsicInfo->vaEnd);
m_attribs.numOfVpu = m_adp->pAsicInfo->numberOfVPU;
}
void