fix gpu bug
This commit is contained in:
parent
a51991e777
commit
b580a2122f
|
@ -42,13 +42,12 @@ std::shared_ptr<mindspore::CPUDeviceInfo> CPUDeviceInfoFromCPUDeviceContext(cons
|
||||||
return cpu_info;
|
return cpu_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<mindspore::MaliGPUDeviceInfo> GPUDeviceInfoFromGPUDeviceContext(
|
std::shared_ptr<mindspore::GPUDeviceInfo> GPUDeviceInfoFromGPUDeviceContext(const lite::DeviceContext &gpu_context) {
|
||||||
const lite::DeviceContext &gpu_context) {
|
|
||||||
if (gpu_context.device_type_ != DT_GPU) {
|
if (gpu_context.device_type_ != DT_GPU) {
|
||||||
MS_LOG(ERROR) << "function input parameter is not gpu context.";
|
MS_LOG(ERROR) << "function input parameter is not gpu context.";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
auto gpu_info = std::make_shared<mindspore::MaliGPUDeviceInfo>();
|
auto gpu_info = std::make_shared<mindspore::GPUDeviceInfo>();
|
||||||
gpu_info->SetEnableFP16(gpu_context.device_info_.gpu_device_info_.enable_float16_);
|
gpu_info->SetEnableFP16(gpu_context.device_info_.gpu_device_info_.enable_float16_);
|
||||||
PassBasicProperties(gpu_info, gpu_context);
|
PassBasicProperties(gpu_info, gpu_context);
|
||||||
return gpu_info;
|
return gpu_info;
|
||||||
|
|
Loading…
Reference in New Issue