昇腾社区首页
中文
注册

(beta)c10_npu::GetDevice

定义文件

torch_npu\csrc\core\npu\NPUFunctions.h

函数原型

[object Object]

功能说明

NPU设备id获取,返回值类型aclError,与cudaError_t c10::cuda::GetDevice(int* device)相同。

参数说明

device:DeviceIndex类型,存储获取的设备id。

支持的型号

  • [object Object]Atlas 训练系列产品[object Object]
  • [object Object]Atlas A2 训练系列产品[object Object]
  • [object Object]Atlas A3 训练系列产品[object Object]
  • [object Object]Atlas 推理系列产品[object Object]