mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
minor stuff reading the printed code [pr] (#13177)
This commit is contained in:
parent
8e868dced8
commit
41e45c20ff
3 changed files with 2 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ def compile(onnx_file):
|
|||
np.testing.assert_equal(test_val, ret, "JIT run failed")
|
||||
print("jit run validated")
|
||||
|
||||
# checks from compile2
|
||||
# check gated read_image usage
|
||||
kernel_count = 0
|
||||
read_image_count = 0
|
||||
gated_read_image_count = 0
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ def linearize(sink:UOp) -> list[UOp]:
|
|||
# number the uops in "ideal" order
|
||||
nkey = {u:i for i,u in enumerate(sorted(lst, key=lambda x: priorities[x]+(x.tuplize if TUPLE_ORDER else ())))}
|
||||
|
||||
# then force then to be toposorted in as close to the ideal order as possible
|
||||
# then force them to be toposorted in as close to the ideal order as possible
|
||||
heap = [(-nkey[sink], sink)]
|
||||
newlst = []
|
||||
while heap:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ def simplify_merge_adjacent(u:UOp) -> UOp|None:
|
|||
# check if it simplifies
|
||||
if count_divmod(nidx) <= count_divmod(u):
|
||||
u = nidx
|
||||
continue
|
||||
return u
|
||||
|
||||
pm_simplify_ranges = PatternMatcher([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue