P4 to Git Change 1702079 by jujiang@JJ-OCL-w8 on 2018/11/02 16:01:11

SWDEV-155310 - Request for OpenCL extension function to set stable pstate

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#60 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_profile_amd.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_profile_amd.h#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#324 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#600 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#170 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#115 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#35 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#102 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#32 edit
This commit is contained in:
foreman
2018-11-02 16:09:59 -04:00
parent 4801cb045b
commit 1a7008f29b
7 changed files with 33 additions and 1 deletions
+9 -1
View File
@@ -22,7 +22,6 @@
#include "acl.h"
#include "amdocl/cl_common.hpp"
//#include "CL/cl_gl.h"
#ifdef _WIN32
#include <d3d9.h>
@@ -2263,4 +2262,13 @@ cl_int Device::hwDebugManagerInit(amd::Context* context, uintptr_t messageStorag
return status;
}
bool Device::SetClockMode(const cl_set_device_clock_mode_input_amd setClockModeInput, cl_set_device_clock_mode_output_amd* pSetClockModeOutput) {
bool result = false;
Pal::SetClockModeInput setClockMode = {};
Pal::DeviceClockMode palClockMode = static_cast<Pal::DeviceClockMode>(setClockModeInput.clock_mode);
setClockMode.clockMode = palClockMode;
result = (Pal::Result::Success == (iDev()->SetClockMode(setClockMode, reinterpret_cast<Pal::SetClockModeOutput*>(pSetClockModeOutput))))? true : false;
return result;
}
} // namespace pal