to_device
函数功能
移动Tensor到Device内存中。
函数原型
1 | to_device(deviceId: int) |
输入参数说明
参数名 |
类型 |
说明 |
|---|---|---|
deviceId |
int |
Device设备的ID号。 |
抛异常接口
分配Tensor内存失败及拷贝到Device侧失败,抛出Runtime异常。
父主题: Tensor
移动Tensor到Device内存中。
1 | to_device(deviceId: int) |
参数名 |
类型 |
说明 |
|---|---|---|
deviceId |
int |
Device设备的ID号。 |
分配Tensor内存失败及拷贝到Device侧失败,抛出Runtime异常。