MCPcopy Create free account
hub / github.com/MLSysU/TD-Pipe / _shared_pointers

Function _shared_pointers

TD_Pipe/model_executor/weight_utils.py:36–44  ·  view source on GitHub ↗
(tensors)

Source from the content-addressed store, hash-verified

34
35
36def _shared_pointers(tensors):
37 ptrs = defaultdict(list)
38 for k, v in tensors.items():
39 ptrs[v.data_ptr()].append(k)
40 failing = []
41 for _, names in ptrs.items():
42 if len(names) > 1:
43 failing.append(names)
44 return failing
45
46
47def convert_bin_to_safetensor_file(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected