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

Function get_current_device

colossalai/utils/common.py:17–21  ·  view source on GitHub ↗

A wrapper function for accelerator's API for backward compatibility.

()

Source from the content-addressed store, hash-verified

15
16
17def get_current_device():
18 """
19 A wrapper function for accelerator's API for backward compatibility.
20 """
21 return get_accelerator().get_current_device()
22
23
24def ensure_path_exists(filename: str):

Callers 15

trainFunction · 0.90
benchmark_trainFunction · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
_make_experienceMethod · 0.90
__init__Method · 0.90
_make_experienceMethod · 0.90
__init__Method · 0.90
_calculate_lossMethod · 0.90
generateMethod · 0.90

Calls 2

get_acceleratorFunction · 0.90
get_current_deviceMethod · 0.45

Tested by 15

gen_padded_kwargsFunction · 0.72
gen_padded_causal_kwargsFunction · 0.72
gen_causal_kwargsFunction · 0.72
gen_custom_kwargsFunction · 0.72
check_attn_funcFunction · 0.72
check_ring_attnFunction · 0.72
check_packed_seqFunction · 0.72
test_fp8_linearFunction · 0.72
test_fp8_hookFunction · 0.72
test_drafterFunction · 0.72
test_spec_decFunction · 0.72
test_copy_kv_to_cachesFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…