block those ones

This commit is contained in:
2025-03-27 16:12:47 +08:00
parent 917e0e925b
commit 5d5286489d
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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))
+1
View File
@@ -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):
+1 -1
View File
@@ -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