mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Expand type checking to mypy strict files (#165697)
Expands Pyrefly type checking to check the files outlined in the mypy-strict.ini configuration file: Pull Request resolved: https://github.com/pytorch/pytorch/pull/165697 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
9095a9dfae
commit
f02e3947f6
@ -1739,6 +1739,7 @@ class KernelArgs:
|
||||
for outer, inner in chain(
|
||||
# pyrefly: ignore # bad-argument-type
|
||||
self.input_buffers.items(),
|
||||
# pyrefly: ignore # bad-argument-type
|
||||
self.output_buffers.items(),
|
||||
):
|
||||
if outer in self.inplace_buffers or isinstance(inner, RemovedArg):
|
||||
|
@ -1480,6 +1480,7 @@ class CppGemmTemplate(CppTemplate):
|
||||
gemm_output_buffer = ir.Buffer(
|
||||
# pyrefly: ignore # missing-attribute
|
||||
name=gemm_output_name,
|
||||
# pyrefly: ignore # missing-attribute
|
||||
layout=template_buffer.layout,
|
||||
)
|
||||
current_input_buffer = gemm_output_buffer
|
||||
@ -1503,6 +1504,7 @@ class CppGemmTemplate(CppTemplate):
|
||||
current_input_buffer = ir.Buffer(
|
||||
# pyrefly: ignore # missing-attribute
|
||||
name=buffer_name,
|
||||
# pyrefly: ignore # missing-attribute
|
||||
layout=template_buffer.layout,
|
||||
)
|
||||
|
||||
|
@ -824,6 +824,7 @@ class CppWrapperGpu(CppWrapperCpu):
|
||||
call_args, arg_types = self.prepare_triton_wrapper_args(
|
||||
# pyrefly: ignore # bad-argument-type
|
||||
call_args,
|
||||
# pyrefly: ignore # bad-argument-type
|
||||
arg_types,
|
||||
)
|
||||
wrapper_name = f"call_{kernel_name}"
|
||||
|
@ -683,6 +683,7 @@ class MetalKernel(SIMDKernel):
|
||||
# pyrefly: ignore # missing-argument
|
||||
t
|
||||
for t in self.range_tree_nodes.values()
|
||||
# pyrefly: ignore # missing-argument
|
||||
if t.is_reduction
|
||||
)
|
||||
cmp_op = ">" if reduction_type == "argmax" else "<"
|
||||
@ -865,6 +866,7 @@ class MetalKernel(SIMDKernel):
|
||||
# pyrefly: ignore # missing-argument
|
||||
t.numel
|
||||
for t in self.range_trees
|
||||
# pyrefly: ignore # missing-argument
|
||||
if t.is_reduction
|
||||
)
|
||||
# If using dynamic shapes, set the threadgroup size to be the
|
||||
|
@ -968,6 +968,7 @@ class SIMDKernel(Kernel[CSEVariableType], Generic[CSEVariableType]):
|
||||
# pyrefly: ignore # missing-argument
|
||||
t
|
||||
for t in self.range_trees
|
||||
# pyrefly: ignore # missing-argument
|
||||
if not t.is_reduction or self.inside_reduction
|
||||
]
|
||||
|
||||
|
@ -1004,6 +1004,7 @@ class FxConverter:
|
||||
# pyrefly: ignore # missing-attribute
|
||||
call_kwargs[key]
|
||||
for key in signature
|
||||
# pyrefly: ignore # missing-attribute
|
||||
if key not in cfg.kwargs
|
||||
]
|
||||
|
||||
|
@ -421,6 +421,7 @@ def get_proxy_slot(
|
||||
else:
|
||||
# Attempt to build it from first principles.
|
||||
_build_proxy_for_sym_expr(tracer, obj.node.expr, obj)
|
||||
# pyrefly: ignore # no-matching-overload
|
||||
value = tracker.get(obj)
|
||||
|
||||
if value is None:
|
||||
|
Reference in New Issue
Block a user