下载
中文
注册

beta)struct c10_npu::NPUHooksInterface

定义文件

torch_npu\csrc\core\npu\NPUHooksInterface.h

功能描述

NPUHooksInterface是一个Hook接口类,提供了npu Hook的相关接口。

成员函数

const at::Generator& c10_npu::NPUHooksInterface::getDefaultGenerator(c10::DeviceIndex

device_index)

NPUHooksInterface 获取默认随机数生成器,与const at::Generator& at::CUDAHooksInterface::getDefaultCUDAGenerator(c10::DeviceIndex device_index = -1)相同。

device_index:DeviceIndex类型,指定npu设备id。

支持的型号

  • Atlas 训练系列产品
  • Atlas A2 训练系列产品
  • Atlas 推理系列产品