mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-09 14:15:22 -05:00
add cstyle renderer to the NULL device (#11709)
Co-authored-by: b1tg <b1tg@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
from tinygrad.device import Compiled, Compiler, Renderer, Allocator
|
||||
from tinygrad.uop.ops import Ops
|
||||
from tinygrad.device import Compiled, Compiler, Allocator
|
||||
from tinygrad.engine.jit import MultiGraphRunner
|
||||
from tinygrad.renderer.cstyle import CStyleLanguage
|
||||
|
||||
class NullRenderer(Renderer):
|
||||
class NullRenderer(CStyleLanguage):
|
||||
device = "NULL"
|
||||
code_for_op = {k:lambda:None for k in [Ops.EXP2, Ops.LOG2, Ops.SIN, Ops.SQRT]}
|
||||
has_local = False
|
||||
def render(self, uops:list) -> str: return ""
|
||||
float4 = "float4"
|
||||
|
||||
class NullProgram:
|
||||
def __init__(self, name:str, lib:bytes): pass
|
||||
|
||||
Reference in New Issue
Block a user