MCPcopy
hub / github.com/tinygrad/tinygrad / dedup

Function dedup

tinygrad/helpers.py:23–23  ·  view source on GitHub ↗
(x:Iterable[T])

Source from the content-addressed store, hash-verified

21if WIN: os.system("")
22
23def dedup(x:Iterable[T]): return list(dict.fromkeys(x)) # retains list order
24def argfix(*x):
25 if x and x[0].__class__ in (tuple, list):
26 if len(x) != 1: raise ValueError(f"bad arg {x}")

Callers 15

__call__Method · 0.90
uops_to_dtypesFunction · 0.90
wmma_argsFunction · 0.90
render_kernelMethod · 0.90
render_kernelMethod · 0.90
create_graph_callFunction · 0.90
graph_split_rewriteFunction · 0.90
__init__Method · 0.90
_all_devsMethod · 0.90
supports_uopMethod · 0.90
__init__Method · 0.90
do_process_andFunction · 0.90

Calls

no outgoing calls

Tested by 5

_check_grouped_dimsMethod · 0.72
_verify_indices_z3Method · 0.72
test_trace_metadataMethod · 0.72
test_save_all_dtypesMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…