MCPcopy
hub / github.com/tinygrad/tinygrad / get_stats

Function get_stats

test/null/test_uops_stats.py:20–22  ·  view source on GitHub ↗
(x:Tensor)

Source from the content-addressed store, hash-verified

18# **************** new FlopCounter ****************
19
20def get_stats(x:Tensor):
21 est = estimate_uop(compile_linear(x.schedule_linear()).src[-1])
22 return est.ops, est.mem
23
24@unittest.skipIf(Device.DEFAULT == "WEBGPU", "webgpu does extra load/store for packed types")
25class TestMemoryCount(unittest.TestCase):

Callers 12

test_addMethod · 0.85
test_add_constMethod · 0.85
test_add_sliceMethod · 0.85
test_expandedMethod · 0.85
test_both_expandedMethod · 0.85
test_self_addMethod · 0.85
test_self_add_assignMethod · 0.85
test_copyoutMethod · 0.85
test_simple_addMethod · 0.85
test_simple_add_sqMethod · 0.85
test_simple_matmulMethod · 0.85

Calls 3

estimate_uopFunction · 0.90
compile_linearFunction · 0.90
schedule_linearMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…