torch.xpu.get_rng_state
- torch.xpu.get_rng_state(device='xpu')[源代码]
-
将指定GPU的随机数生成器状态以ByteTensor形式返回。
- 参数
-
device (torch.device 或 int, 可选) – 返回随机数生成器状态的设备。默认值:
'xpu'
(即torch.device('xpu')
,当前的XPU设备)。 - 返回类型
警告
此函数会立即初始化XPU。
将指定GPU的随机数生成器状态以ByteTensor形式返回。
device (torch.device 或 int, 可选) – 返回随机数生成器状态的设备。默认值:'xpu'
(即torch.device('xpu')
,当前的XPU设备)。
警告
此函数会立即初始化XPU。