mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
multicore all the way
This commit is contained in:
parent
77e897b3b1
commit
996d0ac1d2
1 changed files with 2 additions and 2 deletions
|
|
@ -482,9 +482,9 @@ class Kernel:
|
|||
k.apply_opt(Opt(OptOps.UPCAST, 0, 128))
|
||||
|
||||
# make all non first dimensions local
|
||||
if getenv("MULTICORE", 1):
|
||||
if getenv("MULTICORE", 0) and len(k.full_shape) >= 1 and k.full_shape[0] > 1:
|
||||
if k.full_shape[0]%2 == 1: k.apply_opt(Opt(OptOps.PADTO, 0, 2))
|
||||
k.apply_opt(Opt(OptOps.LOCAL, 0, k.full_shape[0]//2))
|
||||
if k.full_shape[0] > 2: k.apply_opt(Opt(OptOps.LOCAL, 0, k.full_shape[0]//2))
|
||||
for i in range(1, k.first_reduce-1): k.apply_opt(Opt(OptOps.LOCAL, 1, 0))
|
||||
else:
|
||||
for i in range(1, k.first_reduce): k.apply_opt(Opt(OptOps.LOCAL, 1, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue