Class GPUDeviceInfo

Inheritance Relationships

Base Type

Class Documentation

class GPUDeviceInfo : public mindspore::DeviceInfoContext

Derived from DeviceInfoContext, The configuration of the model running on the GPU.

Public Functions

inline virtual enum DeviceType GetDeviceType() const override

Get the type of this DeviceInfoContext.

Returns

Type of this DeviceInfoContext.

void SetDeviceID(uint32_t device_id)

Set device id.

Parameters

device_id[in] The device id.

uint32_t GetDeviceID() const

Get the device id.

Returns

The device id.

inline void SetPrecisionMode(const std::string &precision_mode)

Set the precision mode.

Parameters

precision_mode[in] Optional “origin”, “fp16”. “origin” is set as default.

inline std::string GetPrecisionMode() const

Get the precision mode.

Returns

The precision mode.

void SetEnableFP16(bool is_fp16)

Set enables to perform the float16 inference.

Parameters

is_fp16[in] Enable float16 inference or not.

bool GetEnableFP16() const

Get enables to perform the float16 inference.

Returns

Whether enable float16 inference.