MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / cb

Function cb

DeepSpeedExample/megatron/mpu/random.py:82–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 if hasattr(_C, '_cuda_setRNGState') and callable(_C._cuda_setRNGState):
81 # older PyTorch
82 def cb():
83 with device_ctx_manager(device):
84 _C._cuda_setRNGState(new_state)
85 else:
86 # newer PyTorch
87 if device == -1:

Callers

nothing calls this directly

Calls 2

current_deviceMethod · 0.45
set_stateMethod · 0.45

Tested by

no test coverage detected