P4 to Git Change 1117979 by jatang@jatang-opencl-hsa-stg1 on 2015/02/03 10:05:21

EPR #412821 - Add CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD to cl_amd_device_attribute_query.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#56 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h#8 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#239 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#493 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#105 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#43 edit


[ROCm/clr commit: 8eb38c986f]
This commit is contained in:
foreman
2015-02-03 10:13:23 -05:00
parent 800c73dea5
commit 4bde42f56b
4 changed files with 14 additions and 14 deletions
@@ -535,7 +535,10 @@ struct Info : public amd::EmbeddedObject
cl_uint localMemSizePerCU_;
//! Number of banks of local memory
cl_uint localMemBanks_;
cl_uint gfxipVersion_; //!< The core engine GFXIP version
//! The core engine GFXIP version
cl_uint gfxipVersion_;
//! Number of available async queues
cl_uint numAsyncQueues_;
//! Thread trace enable
cl_bool threadTraceEnable_;
@@ -787,6 +787,7 @@ void Device::fillDeviceInfo(
info_.localMemSizePerCU_ = hwInfo()->localMemSizePerCU_;
info_.localMemBanks_ = hwInfo()->localMemBanks_;
info_.gfxipVersion_ = hwInfo()->gfxipVersion_;
info_.numAsyncQueues_ = engines().numComputeRings();
info_.threadTraceEnable_ = settings().threadTraceEnable_;
}
}
@@ -820,6 +821,8 @@ Device::create(CALuint ordinal, CALuint numOfDevices)
return false;
}
engines_.create(m_nEngines, m_engines, settings().numComputeRings_);
amd::Context::Info info = {0};
std::vector<amd::Device*> devices;
devices.push_back(this);
@@ -975,10 +978,8 @@ Device::initializeHeapResources()
amd::ScopedLock k(lockAsyncOpsForInitHeap_);
if (!heapInitComplete_) {
heapInitComplete_ = true;
uint nEngines;
gslEngineDescriptor engines[GSL_ENGINEID_MAX];
queryDeviceEngines(&nEngines, engines);
engines_.create(nEngines, engines, settings().numComputeRings_);
PerformFullInitialization();
uint numComputeRings = engines_.numComputeRings();
scratch_.resize((settings().useSingleScratch_) ? 1 : (numComputeRings ? numComputeRings : 1));
@@ -308,6 +308,8 @@ CALGSLDevice::open(uint32 gpuIndex, bool enableHighPerformanceState, bool report
return false;
}
m_adp->queryAvailableEngines(&m_nEngines, m_engines);
if (m_PerformLazyDeviceInit)
{
// close the adaptor
@@ -1405,14 +1407,6 @@ CALGSLDevice::resCopy(gslMemObject srcRes, gslMemObject dstRes, uint32 flags) co
}
}
void
CALGSLDevice::queryDeviceEngines(uint32 *nEngines, gslEngineDescriptor *engines)
{
PerformFullInitialization();
m_adp->queryAvailableEngines(nEngines, engines);
}
#define CPDMA_THRESHOLD 131072
CopyType
@@ -115,7 +115,6 @@ public:
void PerformAdapterInitialization() const;
void PerformFullInitialization() const;
void queryDeviceEngines(uint32* nEngines, gslEngineDescriptor* engines);
CopyType GetCopyType(gslMemObject srcMem, gslMemObject destMem, size_t* srcOffset,
size_t* destOffset, bool allowDMA, uint32 flags, uint64& surfaceSize,
@@ -160,6 +159,9 @@ protected:
channelSwizzleMode a : 8; ///< Alpha channel of texture
} channelSwizzle;
uint m_nEngines;
gslEngineDescriptor m_engines[GSL_ENGINEID_MAX];
private:
gsl::gsAdaptor* m_adp;
gsl::gsCtx* m_cs;