Skip to content

Commit

Permalink
space
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuxyz committed Jun 16, 2024
1 parent 7b38464 commit 3b8ff34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tinygrad/engine/jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __call__(self, *args, **kwargs) -> ReturnType:
assert len(set(input_buffers)) == len(input_buffers), "duplicate inputs to JIT"
var_vals: Dict[Variable, int] = merge_dicts([varvals for _,varvals,_,_ in st_varvals_dtype_device] + \
[dict(v.unbind() for v in itertools.chain(args, kwargs.values()) if isinstance(v, Variable))])
st_vars_dtype_device = [(x[0], tuple(sorted(x[1].keys(), key=lambda v:v.expr)), x[2], x[3]) for x in st_varvals_dtype_device]
st_vars_dtype_device = [(x[0], tuple(sorted(x[1].keys(), key=lambda v: v.expr)), x[2], x[3]) for x in st_varvals_dtype_device]
if self.cnt == 0:
# jit ignore
with Context(BEAM=0 if getenv("IGNORE_JIT_FIRST_BEAM") else BEAM.value):
Expand Down
2 changes: 1 addition & 1 deletion tinygrad/runtime/graph/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def __init__(self, jit_cache: List[ExecItem], input_rawbuffers: List[Buffer], va

def __call__(self, rawbufs: List[Buffer], var_vals: Dict[Variable, int], wait=False):
return cpu_time_execution(
lambda: self.clprg(*[x._buf for x in rawbufs], *[x[1] for x in sorted(var_vals.items(), key=lambda x:x[0].expr)]), enable=wait)
lambda: self.clprg(*[x._buf for x in rawbufs], *[x[1] for x in sorted(var_vals.items(), key=lambda x: x[0].expr)]), enable=wait)

0 comments on commit 3b8ff34

Please sign in to comment.