mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
hotfix: no metalgraph if there's weird ops
This commit is contained in:
parent
6733425095
commit
217cda81ba
1 changed files with 2 additions and 0 deletions
|
|
@ -9,6 +9,8 @@ from tinygrad.runtime.ops_metal import MetalDevice
|
|||
|
||||
class MetalGraph:
|
||||
def __init__(self, device:MetalDevice, jit_cache: List[JitItem], input_rawbuffers: List[Buffer], var_vals: Dict[Variable, int]):
|
||||
if not all(isinstance(ji.prg, CompiledASTRunner) for ji in jit_cache): raise GraphException
|
||||
|
||||
self.jit_cache = jit_cache
|
||||
self.input_replace = get_input_replace(jit_cache, input_rawbuffers)
|
||||
self.op_estimate, self.mem_estimate = get_jit_stats(jit_cache)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue