From c73e35aa24017da095ebae7168152aa3dc9c381b Mon Sep 17 00:00:00 2001 From: George Hotz Date: Mon, 31 Mar 2025 19:10:06 +0800 Subject: [PATCH] non const fix --- tinygrad/runtime/ops_dsp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/runtime/ops_dsp.py b/tinygrad/runtime/ops_dsp.py index 51b32f004b..72273a3dc2 100644 --- a/tinygrad/runtime/ops_dsp.py +++ b/tinygrad/runtime/ops_dsp.py @@ -216,7 +216,7 @@ def prefetch_l2(ld:UOp, idx:UOp): arg="__builtin_HEXAGON_Y4_l2fetch({0}, 0x808000|{1});") else: fetch_lines = 8 - if nlen_uop.arg <= 8192: fetch_lines = ((nlen_uop.arg+127)//128)*2+1 + if nlen_uop.op is Ops.CONST and nlen_uop.arg <= 8192: fetch_lines = ((nlen_uop.arg+127)//128)*2+1 fetch_lines = max(fetch_lines, 8) # fetch up to 8192