mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 07:28:15 -05:00
simpler unbind_view [pr] (#10636)
This commit is contained in:
@@ -21,7 +21,8 @@ def unbind_view(ctx:list[dict[Variable, int]], x:UOp):
|
||||
if any(x.op is Ops.BIND for x in st.vars()):
|
||||
st, var_vals = st.unbind()
|
||||
ctx.append(var_vals)
|
||||
return x.replace(arg=st) if st != x.st else None
|
||||
return x.replace(arg=st)
|
||||
return None
|
||||
|
||||
def unbind_bind(ctx:list[dict[Variable, int]], x:UOp):
|
||||
var, val = x.unbind()
|
||||
|
||||
Reference in New Issue
Block a user