Remove `type: ignore` comments (#2533)
* remove some type ignore comments and fix errors * remove unnecessary get_args import * revert triton changes * remove changes not in tinygradpull/2537/head
parent
12fa846122
commit
fa549d198d
|
@ -48,7 +48,7 @@ def time_linearizer(lin:Linearizer, rawbufs:List[Buffer], allow_test_size=True,
|
|||
# TODO: this is copied from prg.__call__
|
||||
global_size, local_size = prg.launch_dims(var_vals)
|
||||
prg.global_size = real_global_size
|
||||
if global_size is not None and local_size is None and all_int(tuple(prg.global_size)): # type: ignore[arg-type]
|
||||
if global_size is not None and prg.global_size is not None and local_size is None and all_int(tuple(prg.global_size)):
|
||||
local_size = optimize_local_size(prg.clprg, global_size, rawbufs)
|
||||
global_size = [g//l if g%l == 0 else g/l for g,l in zip(global_size, local_size)]
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ class LazyOp:
|
|||
def get_lazyops(self) -> List[LazyOp]: return [self] + [item for x in self.src for item in x.get_lazyops()]
|
||||
|
||||
def replace_with_movement_ops(self:LazyOp, ops:List[Tuple[MovementOps, Tuple[Any, ...]]]) -> 'LazyBuffer':
|
||||
assert self.op in BinaryOps or self.op in UnaryOps or self.op in TernaryOps
|
||||
assert isinstance(self.op, (UnaryOps, BinaryOps, TernaryOps))
|
||||
srcs = [z.replace_with_movement_ops(ops) for z in self.src]
|
||||
return srcs[0].e(self.op, *srcs[1:], arg=self.arg) # type: ignore
|
||||
return srcs[0].e(self.op, *srcs[1:], arg=self.arg)
|
||||
|
||||
@property
|
||||
def st(self): raise NotImplementedError
|
||||
|
|
Loading…
Reference in New Issue