mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-09-02 03:46:07 +00:00
block those ones
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ if __name__ == "__main__":
|
||||
k.apply_opt(Opt(OptOps.UNROLL, 0, 4))
|
||||
k.apply_opt(Opt(OptOps.UPCAST, 0, 8))
|
||||
elif k.full_shape[-3:] == (32,3,3):
|
||||
if k.full_shape[-4]%4 != 0: k.apply_opt(Opt(OptOps.PADTO, len(k.full_shape)-4, 4))
|
||||
if k.full_shape[0] != 30 and k.full_shape[-4]%4 != 0: k.apply_opt(Opt(OptOps.PADTO, len(k.full_shape)-4, 4))
|
||||
# 3x3 dwconv
|
||||
k.apply_opt(Opt(OptOps.UNROLL, 0, 0))
|
||||
k.apply_opt(Opt(OptOps.UNROLL, 0, 0))
|
||||
|
||||
@@ -161,6 +161,7 @@ def split_load_store(ctx:Renderer|None, ls:UOp, idx:UOp):
|
||||
must_divide = True
|
||||
if ctx is not None and ctx.device == "DSP":
|
||||
lengths = [128,64,32,16,8,4]
|
||||
if ls.dtype.count < 128: return None
|
||||
#if ls.dtype.count in [192, 288, 160, 96, 544]: return None # leave these as loads
|
||||
must_divide = False
|
||||
elif buf.dtype.base != dtypes.float and buf.dtype.base != dtypes.half and not isinstance(buf.dtype, ImageDType):
|
||||
|
||||
@@ -122,7 +122,7 @@ conv_pm = PatternMatcher([
|
||||
#dsp_pm = conv_pm+PatternMatcher([
|
||||
dsp_pm = PatternMatcher([
|
||||
# convert load char32 to load char128
|
||||
(UPat(Ops.LOAD, (dtypes.uchar.vec(64), dtypes.uchar.vec(32)), src=(UPat.var("buf").cast(),), name="load"),
|
||||
(UPat(Ops.LOAD, (dtypes.uchar.vec(96), dtypes.uchar.vec(64), dtypes.uchar.vec(32)), src=(UPat.var("buf").cast(),), name="load"),
|
||||
lambda load, buf: load.replace(dtype=dtypes.uchar.vec(128),
|
||||
src=(buf.cast(buf.dtype.base.vec(128).ptr(size=buf.dtype.size, local=buf.dtype.local)),)+load.src[1:]).gep(tuple(range(0, load.dtype.count)))),
|
||||
# GEP on REDUCE
|
||||
|
||||
Reference in New Issue
Block a user