mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Remove unnecessary "# noqa: set_linter" comments (#159467)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/159467 Approved by: https://github.com/eellison
This commit is contained in:
committed by
PyTorch MergeBot
parent
289f62ce8a
commit
a5725965ea
@ -764,7 +764,7 @@ class CUDABenchmarkRequest(GPUDeviceBenchmarkMixin, BenchmarkRequest):
|
||||
return
|
||||
self.ensure_dll_loaded()
|
||||
unique_input_count = len(
|
||||
{meta.name for meta in self.input_tensor_meta} # noqa: set_linter
|
||||
dict.fromkeys(meta.name for meta in self.input_tensor_meta)
|
||||
)
|
||||
args = [c_void_p(None) for _ in range(unique_input_count + 1)]
|
||||
stream_ptr = c_void_p(torch.cuda.current_stream().cuda_stream)
|
||||
|
||||
@ -96,7 +96,7 @@ class ROCmBenchmarkRequest(GPUDeviceBenchmarkMixin, BenchmarkRequest):
|
||||
return
|
||||
self.ensure_dll_loaded()
|
||||
unique_input_count = len(
|
||||
{meta.name for meta in self.input_tensor_meta} # noqa: set_linter
|
||||
dict.fromkeys(meta.name for meta in self.input_tensor_meta)
|
||||
)
|
||||
args = [c_void_p(None) for _ in range(unique_input_count + 1)]
|
||||
stream_ptr = c_void_p(torch.cuda.current_stream().cuda_stream)
|
||||
|
||||
@ -3970,8 +3970,8 @@ class TritonKernel(SIMDKernel[TritonCSEVariable]):
|
||||
optimize_mem = V.graph.is_inference or V.graph.is_backward
|
||||
|
||||
inductor_meta = {
|
||||
# Triton will not accept an OrderedSet for autotune_hints
|
||||
"grid_type": self._get_grid_type().__name__,
|
||||
# Triton will not accept an OrderedSet for autotune_hints
|
||||
"autotune_hints": set(self.autotune_hints), # noqa: set_linter
|
||||
"kernel_name": str(Placeholder.DESCRIPTIVE_NAME),
|
||||
"mutated_arg_names": mutated_args,
|
||||
|
||||
@ -3366,13 +3366,12 @@ def tabulate_2d(elements: Sequence[Sequence[T]], headers: Sequence[T]) -> str:
|
||||
for i, e in enumerate(row):
|
||||
widths[i] = max(widths[i], len(str(e)))
|
||||
lines = []
|
||||
# Need nested {} for string formatting; ignore SET_LINTER here
|
||||
lines.append("|".join(f" {h:{w}} " for h, w in zip(headers, widths))) # noqa: set_linter
|
||||
lines.append("|".join(f" {h:{w}} " for h, w in zip(headers, widths)))
|
||||
# widths whitespace horizontal separators
|
||||
total_width = sum(widths) + (len(widths) * 2) + (len(widths) - 1)
|
||||
lines.append("-" * total_width)
|
||||
for row in elements:
|
||||
lines.append("|".join(f" {e:{w}} " for e, w in zip(row, widths))) # noqa: set_linter
|
||||
lines.append("|".join(f" {e:{w}} " for e, w in zip(row, widths)))
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user