Skip to content

Commit 8e868dc

Browse files
authored
only GROUPTOP one reduce kernel (tinygrad#13176)
* only GROUPTOP one reduce kernel * ALLOWED_GATED_READ_IMAGE=148
1 parent 834067d commit 8e868dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ jobs:
392392
llvm: 'true'
393393
- name: Test openpilot model kernel count and gate usage
394394
run: |
395-
ALLOWED_KERNEL_COUNT=123 ALLOWED_READ_IMAGE=1452 ALLOWED_GATED_READ_IMAGE=122 FLOAT16=1 CL=1 IMAGE=2 python examples/openpilot/compile3.py https://gitlab.com/commaai/openpilot-lfs.git/gitlab-lfs/objects/cf6376aa9a090f0da26c280ef69eabf9bbdd51d1faac9ed392919c3db69be916
395+
ALLOWED_KERNEL_COUNT=123 ALLOWED_READ_IMAGE=1452 ALLOWED_GATED_READ_IMAGE=148 FLOAT16=1 CL=1 IMAGE=2 python examples/openpilot/compile3.py https://gitlab.com/commaai/openpilot-lfs.git/gitlab-lfs/objects/cf6376aa9a090f0da26c280ef69eabf9bbdd51d1faac9ed392919c3db69be916
396396
- name: Test openpilot CL compile fp16
397397
run: FLOAT16=1 DEBUGCL=1 CL=1 IMAGE=2 python examples/openpilot/compile3.py https://gitlab.com/commaai/openpilot-lfs.git/gitlab-lfs/objects/cf6376aa9a090f0da26c280ef69eabf9bbdd51d1faac9ed392919c3db69be916
398398
- name: Test openpilot CL compile fp32 (test correctness)

tinygrad/codegen/opt/heuristic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def hand_coded_optimizations(k:Scheduler) -> Scheduler:
8181
return k
8282

8383
# are we grouping? (requires local shape support)
84-
if resolve(prod(k.output_shape[i] for i in k.upcastable_dims) <= 2048, False):
84+
if resolve(prod(k.output_shape[i] for i in k.upcastable_dims) <= 2048, False) and len(k.reduceops) == 1:
8585
for sz in [16]:
8686
try:
8787
k.apply_opt(Opt(OptOps.GROUPTOP, 0, sz))

0 commit comments

Comments
 (0)