P4 to Git Change 1175724 by gandryey@gera-ubuntu14 on 2015/07/30 15:50:59
ECR #304775 - Remove CALdevicestatus
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#516 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#146 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#128 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#52 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/backend.h#7 edit
[ROCm/clr commit: 4b97729c2e]
This commit is contained in:
@@ -81,12 +81,6 @@ CALGSLDevice::getMaxTextureSize() const
|
||||
return static_cast<uint32>(m_maxtexturesize);
|
||||
}
|
||||
|
||||
void
|
||||
CALGSLDevice::getMemInfo(gslMemInfo* memInfo) const
|
||||
{
|
||||
m_cs->getMemInfo(memInfo, GSL_MEMINFO_BASIC);
|
||||
}
|
||||
|
||||
void
|
||||
CALGSLDevice::getAttribs_int(gsl::gsCtx* cs)
|
||||
{
|
||||
@@ -157,35 +151,6 @@ CALGSLDevice::getAttribs_int(gsl::gsCtx* cs)
|
||||
m_attribs.isSVMFineGrainSystem = m_adp->pAsicInfo->svmFineGrainSystem;
|
||||
}
|
||||
|
||||
void
|
||||
CALGSLDevice::getStatus_int(gsl::gsCtx* cs)
|
||||
{
|
||||
m_deviceStatus.struct_size = sizeof(CALdevicestatus);
|
||||
|
||||
gslMemInfo memInfo;
|
||||
cs->getMemInfo(&memInfo, GSL_MEMINFO_BASIC);
|
||||
|
||||
m_deviceStatus.availLocalRAM = (uint32)((memInfo.cardMemAvailableBytes + memInfo.cardExtMemAvailableBytes) / (1024 * 1024));
|
||||
m_deviceStatus.availUncachedRemoteRAM = (uint32)(memInfo.agpMemAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availCachedRemoteRAM = (uint32)(memInfo.agpMemAvailableCacheableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availVisibleHeap = (uint32) (memInfo.cardMemAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availInvisibleHeap = (uint32) (memInfo.cardExtMemAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availDirectHeap = (uint32) (memInfo.directAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availCoherentHeap = (uint32) (memInfo.coherentAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availRemoteSharedHeap = (uint32) (memInfo.sharedAvailableBytes / (1024 * 1024));
|
||||
m_deviceStatus.availCachedRemoteSharedHeap = (uint32) (memInfo.sharedCacheableAvailableBytes / (1024 * 1024));
|
||||
|
||||
m_deviceStatus.largestBlockVisibleHeap = (uint32) (memInfo.cardLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockInvisibleHeap = (uint32) (memInfo.cardExtLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockRemoteHeap = (uint32) (memInfo.agpLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockCachedRemoteHeap = (uint32) (memInfo.agpCacheableLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockDirectHeap = (uint32) (memInfo.directLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockCoherentHeap = (uint32) (memInfo.coherentLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockRemoteSharedHeap = (uint32) (memInfo.sharedLargestFreeBlockBytes / (1024 * 1024));
|
||||
m_deviceStatus.largestBlockCachedRemoteSharedHeap = (uint32) (memInfo.sharedCacheableLargestFreeBlockBytes / (1024 * 1024));
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
CALGSLDevice::open(uint32 gpuIndex, bool enableHighPerformanceState, bool reportAsOCL12Device)
|
||||
{
|
||||
@@ -578,7 +543,7 @@ CALGSLDevice::SetupContext(int32 &asic_id)
|
||||
|
||||
//cache device details
|
||||
getAttribs_int(temp_cs);
|
||||
getStatus_int(temp_cs);
|
||||
temp_cs->getMemInfo(&m_memInfo, GSL_MEMINFO_BASIC);
|
||||
|
||||
m_vmMode = temp_cs->getVMMode();
|
||||
|
||||
|
||||
@@ -96,8 +96,7 @@ public:
|
||||
|
||||
uint32 getMaxTextureSize() const;
|
||||
const CALdeviceattribs& getAttribs() const { return m_attribs; }
|
||||
const CALdevicestatus& getStatus() const {return m_deviceStatus; }
|
||||
void getMemInfo(gslMemInfo* memInfo) const;
|
||||
const gslMemInfo& getMemInfo() const { return m_memInfo; }
|
||||
|
||||
bool isVmMode() const { return m_vmMode; };
|
||||
|
||||
@@ -203,11 +202,10 @@ private:
|
||||
void PerformFullInitialization_int();
|
||||
|
||||
void getAttribs_int(gsl::gsCtx* cs);
|
||||
void getStatus_int(gsl::gsCtx* cs);
|
||||
bool ResolveAperture(const gslMemObjectAttribTiling tiling) const;
|
||||
|
||||
CALdeviceattribs m_attribs;
|
||||
CALdevicestatus m_deviceStatus;
|
||||
gslMemInfo m_memInfo;
|
||||
gslTextureResourceObject m_textureResource;
|
||||
gslSamplerObject m_textureSampler;
|
||||
gslEngineID m_forcedComputeEngineID;
|
||||
|
||||
@@ -105,27 +105,6 @@ typedef struct CALdeviceattribsRec {
|
||||
bool isSVMFineGrainSystem; /**< check if SVM finegrainsystem */
|
||||
} CALdeviceattribs;
|
||||
|
||||
/** CAL device status */
|
||||
typedef struct CALdevicestatusRec {
|
||||
CALuint struct_size; /**< Client filled out size of CALdevicestatus struct */
|
||||
CALuint availLocalRAM; /**< Amount of available local GPU RAM in megabytes */
|
||||
CALuint availUncachedRemoteRAM; /**< Amount of available uncached remote GPU memory in megabytes */
|
||||
CALuint availCachedRemoteRAM; /**< Amount of available cached remote GPU memory in megabytes */
|
||||
CALuint availVisibleHeap; /**< Amount of available visible local GPU RAM in megabytes */
|
||||
CALuint availInvisibleHeap; /**< Amount of available invisible local GPU RAM in megabytes */
|
||||
CALuint availDirectHeap; /**< Amount of available direct GPU memory in megabytes */
|
||||
CALuint availCoherentHeap; /**< Amount of available coherent GPU memory in megabytes */
|
||||
CALuint availRemoteSharedHeap; /**< Amount of available remote Shared GPU memory in megabytes */
|
||||
CALuint availCachedRemoteSharedHeap; /**< Amount of available cached remote Shared GPU memory in megabytes */
|
||||
CALuint largestBlockVisibleHeap; /**< Largest block available visible local GPU RAM in megabytes */
|
||||
CALuint largestBlockInvisibleHeap; /**< Largest block available invisible local GPU RAM in megabytes */
|
||||
CALuint largestBlockRemoteHeap; /**< Largest block available remote GPU memory in megabytes */
|
||||
CALuint largestBlockCachedRemoteHeap; /**< Largest block available cached remote GPU memory in megabytes */
|
||||
CALuint largestBlockDirectHeap; /**< Largest block available direct GPU memory in megabytes */
|
||||
CALuint largestBlockCoherentHeap; /**< Largest block available coherent GPU memory in megabytes */
|
||||
CALuint largestBlockRemoteSharedHeap; /**< Largest block available remote Shared GPU memory in megabytes */
|
||||
CALuint largestBlockCachedRemoteSharedHeap; /**< Largest block available cached remote Shared GPU memory in megabytes */
|
||||
} CALdevicestatus;
|
||||
|
||||
/** CAL resource allocation flags **/
|
||||
typedef enum CALresallocflagsEnum {
|
||||
|
||||
Reference in New Issue
Block a user