P4 to Git Change 1519129 by skudchad@skudchad_test2_win_opencl on 2018/02/23 22:04:04

SWDEV-145570 -  Add new info stats for VDI layer which are reported by HIP

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/14290/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#70 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#283 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#296 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#585 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#413 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#83 edit
This commit is contained in:
foreman
2018-02-23 22:16:44 -05:00
parent b561617774
commit b909e781de
7 changed files with 60 additions and 20 deletions
+6 -2
View File
@@ -333,7 +333,11 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
(settings().checkExtension(ClKhrFp64)) ? 1 : 0;
info_.nativeVectorWidthHalf_ = info_.preferredVectorWidthHalf_ = 0; // no half support
info_.maxClockFrequency_ = (calAttr.engineClock != 0) ? calAttr.engineClock : 555;
info_.maxEngineClockFrequency_ = (calAttr.engineClock != 0) ? calAttr.engineClock : 555;
info_.maxMemoryClockFrequency_ = (calAttr.memoryClock != 0) ? calAttr.memoryClock : 555;
info_.timeStampFrequency_ = 1000000;
info_.vramBusBitWidth_ = calAttr.memBusWidth;
info_.l2CacheSize_ = 0;
info_.maxParameterSize_ = 1024;
info_.minDataTypeAlignSize_ = sizeof(cl_long16);
info_.singleFPConfig_ =
@@ -571,7 +575,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
info_.simdWidth_ = hwInfo()->simdWidth_;
info_.simdInstructionWidth_ = hwInfo()->simdInstructionWidth_;
info_.wavefrontWidth_ = calAttr.wavefrontSize;
info_.globalMemChannels_ = calAttr.memBusWidth / 32;
info_.globalMemChannelBanks_ = calAttr.numMemBanks;
info_.globalMemChannelBankWidth_ = hwInfo()->memChannelBankWidth_;
info_.localMemSizePerCU_ = hwInfo()->localMemSizePerCU_;
+3 -3
View File
@@ -124,7 +124,7 @@ void VirtualGPU::MemoryDependency::clear(bool all) {
VirtualGPU::DmaFlushMgmt::DmaFlushMgmt(const Device& dev) : cbWorkload_(0), dispatchSplitSize_(0) {
aluCnt_ = dev.info().simdPerCU_ * dev.info().simdWidth_ * dev.info().maxComputeUnits_;
maxDispatchWorkload_ = static_cast<uint64_t>(dev.info().maxClockFrequency_) *
maxDispatchWorkload_ = static_cast<uint64_t>(dev.info().maxEngineClockFrequency_) *
// find time in us
dev.settings().maxWorkloadTime_ * aluCnt_;
resetCbWorkload(dev);
@@ -132,7 +132,7 @@ VirtualGPU::DmaFlushMgmt::DmaFlushMgmt(const Device& dev) : cbWorkload_(0), disp
void VirtualGPU::DmaFlushMgmt::resetCbWorkload(const Device& dev) {
cbWorkload_ = 0;
maxCbWorkload_ = static_cast<uint64_t>(dev.info().maxClockFrequency_) *
maxCbWorkload_ = static_cast<uint64_t>(dev.info().maxEngineClockFrequency_) *
// find time in us
dev.settings().minWorkloadTime_ * aluCnt_;
}
@@ -1794,7 +1794,7 @@ bool VirtualGPU::submitKernelInternalHSA(const amd::NDRangeContainer& sizes,
gpuDefQueue->schedParams_->data())[gpuDefQueue->schedParamIdx_];
param->signal = 1;
// Scale clock to 1024 to avoid 64 bit div in the scheduler
param->eng_clk = (1000 * 1024) / dev().info().maxClockFrequency_;
param->eng_clk = (1000 * 1024) / dev().info().maxEngineClockFrequency_;
param->hw_queue = patchStart + sizeof(uint32_t) /* Rewind packet*/;
param->hsa_queue = gpuDefQueue->hsaQueueMem()->vmAddress();
param->releaseHostCP = 0;