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
这个提交包含在:
foreman 于 2018-02-23 22:16:44 -05:00 提交
1 父节点 b561617774
当前提交 b909e781de
7 个文件已更改
+60 -20

没有与搜索条件相匹配的文件

+6 -4
查看文件
@@ -293,7 +293,7 @@ bool Device::init() {
::strcpy(info.name_, line.substr(line.find_first_of(':') + 2).c_str());
name = true;
} else if (!freq && (line.find("cpu MHz\t\t: ") != std::string::npos)) {
info.maxClockFrequency_ = ::atoi(line.substr(line.find_first_of(':') + 2).c_str());
info.maxEngineClockFrequency_ = ::atoi(line.substr(line.find_first_of(':') + 2).c_str());
freq = true;
}
}
@@ -338,7 +338,8 @@ bool Device::init() {
}
info.maxClockFrequency_ = 0;
info.maxEngineClockFrequency_ = 0;
info.maxMemoryClockFrequency_ = 0;
HKEY hKey;
// Open the key
@@ -346,7 +347,7 @@ bool Device::init() {
KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
// Read the value
DWORD dwLen = 4;
RegQueryValueEx(hKey, "~MHz", NULL, NULL, (LPBYTE)&info.maxClockFrequency_, &dwLen);
RegQueryValueEx(hKey, "~MHz", NULL, NULL, (LPBYTE)&info.maxEngineClockFrequency_, &dwLen);
// Cleanup and return
RegCloseKey(hKey);
@@ -355,7 +356,8 @@ bool Device::init() {
#else
::strcpy(info.name_, "Unknown Processor");
::strcpy(info.vendor_, "Unknown Vendor");
info.maxClockFrequency_ = 0;
info.maxEngineClockFrequency_ = 0;
info.maxMemoryClockFrequency_ = 0;
#endif
#define OPENCL_VERSION_STR XSTR(OPENCL_MAJOR) "." XSTR(OPENCL_MINOR)