Shortcuts

torch.xpu.get_rng_state

torch.xpu.get_rng_state(device='xpu')[源代码]

返回指定GPU的随机数生成器状态为ByteTensor。

Parameters

设备 (torch.deviceint, 可选) – 返回随机数生成器状态的设备。 默认值: 'xpu' (即, torch.device('xpu'), 当前的 XPU 设备)。

Return type

张量

警告

此函数会急切地初始化XPU。

优云智算