mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
applied_opts/estimates in program spec are aliases for the sink arg (#14860)
* remove applied_opts from programspec * comment that out * placement * update tests * p.ast.arg * remove todo comment * maybe this too * it can exist as an alias, also for estimates
This commit is contained in:
@@ -80,7 +80,7 @@ class ProgramSpec:
|
||||
ins:list[int]=field(default_factory=list)
|
||||
|
||||
@property
|
||||
def estimates(self) -> Estimates: return self.ast.arg.estimates
|
||||
def estimates(self) -> Estimates: return self.ast.arg.estimates if self.ast.arg is not None and self.ast.arg.estimates is not None else Estimates()
|
||||
|
||||
@functools.cached_property
|
||||
def function_name(self) -> str: return to_function_name(self.name)
|
||||
@@ -89,10 +89,7 @@ class ProgramSpec:
|
||||
def runtimevars(self) -> dict[str, int]: return {v.arg[0]: i for i, v in enumerate(self.vars) if v.arg[0] == 'core_id'}
|
||||
|
||||
@property
|
||||
def applied_opts(self) -> tuple[Opt, ...]|None:
|
||||
if self.uops is None: return None
|
||||
assert self.uops[-1].op is Ops.SINK, self.uops[-1].op
|
||||
return self.uops[-1].arg.applied_opts
|
||||
def applied_opts(self) -> tuple[Opt, ...]|None: return self.ast.arg.applied_opts if self.ast.arg is not None else None
|
||||
|
||||
def launch_dims(self, var_vals:dict[str, int]):
|
||||
global_size = [sym_infer(sz, var_vals) for sz in self.global_size]
|
||||
|
||||
Reference in New Issue
Block a user