remove useless code
This commit is contained in:
parent
ae4720c9fd
commit
9082d46ff0
|
@ -227,10 +227,14 @@ class MS_API GPUDeviceInfo : public DeviceInfoContext {
|
|||
/// \return The device id.
|
||||
uint32_t GetDeviceID() const;
|
||||
|
||||
void SetGpuTrtInferMode(bool gpu_trt_infer_mode);
|
||||
bool GetGpuTrtInferMode() const;
|
||||
/// \brief Set the precision mode.
|
||||
///
|
||||
/// \param[in] precision_mode Optional "origin", "fp16". "origin" is set as default.
|
||||
inline void SetPrecisionMode(const std::string &precision_mode);
|
||||
|
||||
inline void SetPrecisionMode(const std::string &precison_mode);
|
||||
/// \brief Get the precision mode.
|
||||
///
|
||||
/// \return The precision mode.
|
||||
inline std::string GetPrecisionMode() const;
|
||||
|
||||
/// \brief Set enables to perform the float16 inference
|
||||
|
|
|
@ -25,7 +25,6 @@ constexpr auto kModelOptionGPUEnableFP16 = "mindspore.option.gpu.enable_fp16";
|
|||
constexpr auto kModelOptionKirinNpuFrequency = "mindspore.option.kirin_npu.frequency";
|
||||
constexpr auto kModelOptionDeviceID = "mindspore.option.device_id";
|
||||
constexpr auto kModelOptionGPUDeviceID = kModelOptionDeviceID;
|
||||
constexpr auto kModelOptionGPUTrtInferMode = "mindspore.option.gpu.trt_infer_mode";
|
||||
constexpr auto kModelOptionGPUPrecisionMode = "mindspore.option.gpu.precision_mode";
|
||||
constexpr auto kModelOptionAscend910DeviceID = kModelOptionDeviceID;
|
||||
constexpr auto kModelOptionAscend310DeviceID = kModelOptionDeviceID;
|
||||
|
@ -155,15 +154,6 @@ uint32_t GPUDeviceInfo::GetDeviceID() const {
|
|||
return GetValue<uint32_t>(data_, kModelOptionGPUDeviceID);
|
||||
}
|
||||
|
||||
void GPUDeviceInfo::SetGpuTrtInferMode(bool gpu_trt_infer_mode) {
|
||||
MS_EXCEPTION_IF_NULL(data_);
|
||||
data_->params[kModelOptionGPUTrtInferMode] = gpu_trt_infer_mode;
|
||||
}
|
||||
bool GPUDeviceInfo::GetGpuTrtInferMode() const {
|
||||
MS_EXCEPTION_IF_NULL(data_);
|
||||
return GetValue<bool>(data_, kModelOptionGPUTrtInferMode);
|
||||
}
|
||||
|
||||
void GPUDeviceInfo::SetPrecisionMode(const std::vector<char> &precision_mode) {
|
||||
MS_EXCEPTION_IF_NULL(data_);
|
||||
data_->params[kModelOptionGPUPrecisionMode] = CharToString(precision_mode);
|
||||
|
|
|
@ -292,12 +292,6 @@ uint32_t GPUDeviceInfo::GetDeviceID() const {
|
|||
return GetValue<uint32_t>(data_, kModelOptionGPUDeviceID);
|
||||
}
|
||||
|
||||
void GPUDeviceInfo::SetGpuTrtInferMode(bool gpu_trt_infer_mode) { MS_LOG(ERROR) << "Unsupported Feature."; }
|
||||
bool GPUDeviceInfo::GetGpuTrtInferMode() const {
|
||||
MS_LOG(ERROR) << "Unsupported Feature.";
|
||||
return false;
|
||||
}
|
||||
|
||||
void GPUDeviceInfo::SetPrecisionMode(const std::vector<char> &precision_mode) {
|
||||
MS_LOG(ERROR) << "Unsupported Feature.";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue