mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
@@ -10,9 +10,9 @@ from tinygrad.codegen.linearizer import UOps, UOp
|
||||
from test.test_dtype import is_dtype_supported
|
||||
|
||||
def _uops_to_prg(uops):
|
||||
src = Device[Device.DEFAULT].renderer("test", uops)
|
||||
return CompiledASTRunner(None, "test", src, Device[Device.DEFAULT], [1] if Device[Device.DEFAULT].linearizer_opts.has_local else None,
|
||||
[1] if Device[Device.DEFAULT].linearizer_opts.has_local else None)
|
||||
src = Device[Device.DEFAULT].compiler.render("test", uops)
|
||||
has_local = Device[Device.DEFAULT].compiler.linearizer_opts.has_local
|
||||
return CompiledASTRunner(None, "test", src, Device[Device.DEFAULT], [1] if has_local else None, [1] if has_local else None)
|
||||
|
||||
def uop(uops:List[UOp], uop:UOps, dtype:Optional[DType], vin:Tuple[UOp, ...], arg:Any=None) -> UOp:
|
||||
uops.append(UOp(uop, dtype, tuple(vin), arg))
|
||||
|
||||
Reference in New Issue
Block a user