MCPcopy
hub / github.com/tinygrad/tinygrad / to_function_name

Function to_function_name

tinygrad/helpers.py:155–155  ·  view source on GitHub ↗
(s:str)

Source from the content-addressed store, hash-verified

153
154@functools.cache
155def to_function_name(s:str): return ''.join([c if c in (string.ascii_letters+string.digits+'_') else f'{ord(c):02X}' for c in ansistrip(s)])
156@overload
157def getenv(key:str) -> int: ...
158@overload

Callers 4

function_nameMethod · 0.90
function_nameMethod · 0.90
get_optimized_astMethod · 0.90
export.pyFile · 0.90

Calls 1

ansistripFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…