mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
no pcontig
This commit is contained in:
parent
778358eff6
commit
06fe3a2d57
1 changed files with 7 additions and 3 deletions
|
|
@ -164,13 +164,17 @@ pm_mops = PatternMatcher([
|
|||
])
|
||||
|
||||
def map_contiguous(ctx:RangeifyContext, x:UOp, idx:UOp|None=None):
|
||||
if x.arg is None and idx is not None: return None
|
||||
if x.arg is not None and idx is None: return None
|
||||
# NOTE: partial contig is disabled for now
|
||||
#arg = x.arg
|
||||
arg = None
|
||||
if arg is None and idx is not None: return None
|
||||
if arg is not None and idx is None: return None
|
||||
|
||||
ranges = []
|
||||
new_ranges = []
|
||||
passthrough_idx = []
|
||||
for i,s in enumerate(x.shape):
|
||||
if x.arg is not None and i not in x.arg:
|
||||
if arg is not None and i not in arg:
|
||||
assert idx is not None, "partial contig requires index"
|
||||
ranges.append(idx.src[1+i])
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue