MCPcopy Index your code
hub / github.com/hpcaitech/ColossalAI / _execute_by_gpu_num

Function _execute_by_gpu_num

colossalai/testing/utils.py:202–205  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

200
201 def _wrap_func(f):
202 def _execute_by_gpu_num(*args, **kwargs):
203 num_avail_gpu = get_accelerator().device_count()
204 if num_avail_gpu >= min_gpus:
205 f(*args, **kwargs)
206
207 return _execute_by_gpu_num
208

Callers

nothing calls this directly

Calls 3

get_acceleratorFunction · 0.90
fFunction · 0.50
device_countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…