Skip to content

Commit

Permalink
try this [pr]
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuxyz committed Dec 19, 2024
1 parent 791a80a commit 8205af2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tinygrad/shape/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def __add__(self, vm1:View) -> Optional[View]:
if vm1.mask:
if (merged := vm2 + vm1.shrink(vm1.mask)) is None: return None
return merged.pad(tuple((b,s-e) for (b,e),s in zip(vm1.mask, vm1.shape)))
if not vm1.shape:
print(f"{self=}")
print(f"{vm1=}")
raise
if not all_int(vm1.shape): return None

# Project vm1's offset and strides on to vm2.
Expand Down Expand Up @@ -202,7 +206,7 @@ def __add__(self, vm1:View) -> Optional[View]:
bad = True
continue
if len(term) != 1:
if not term and newe: newe[0] = 0
if not term: newe[0] = 0
else: bad = True
continue
d1, s1 = term[0]
Expand Down

0 comments on commit 8205af2

Please sign in to comment.