Skip to content

Commit 0684533

Browse files
CodemodService PythonDeprecatedAssertsBotfacebook-github-bot
authored andcommitted
fbcode//executorch/backends/vulkan/test (#2024)
Summary: Pull Request resolved: #2024 Differential Revision: D53990165
1 parent 6375f01 commit 0684533

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

backends/vulkan/test/test_vulkan_delegate_header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ def test_to_bytes_same_as_from_bytes(self) -> None:
101101
header = VulkanDelegateHeader.from_bytes(EXAMPLE_HEADER_DATA)
102102

103103
to_bytes = header.to_bytes()
104-
self.assertEquals(EXAMPLE_HEADER_DATA, to_bytes)
104+
self.assertEqual(EXAMPLE_HEADER_DATA, to_bytes)

exir/program/_program.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def _get_updated_graph_signature(
8080
arg = (
8181
old_input_spec.arg
8282
if isinstance(old_input_spec.arg, ConstantArgument)
83+
# pyre-fixme[20]: Argument `class_fqn` expected.
8384
else type(old_input_spec.arg)(node.name)
8485
)
8586
new_input_specs.append(
@@ -104,6 +105,7 @@ def _get_updated_graph_signature(
104105
arg = (
105106
old_output_spec.arg
106107
if isinstance(old_output_spec.arg, ConstantArgument)
108+
# pyre-fixme[20]: Argument `class_fqn` expected.
107109
else type(old_output_spec.arg)(node.name)
108110
)
109111
new_output_specs.append(

exir/serde/export_serialize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ def serialize_optional_tensor_args(a):
702702
# serialize/deserialize function.
703703
custom_obj_name = f"_custom_obj_{len(self.custom_objs)}"
704704
self.custom_objs[custom_obj_name] = arg
705+
# pyre-fixme[20]: Argument `class_fqn` expected.
705706
return Argument.create(as_custom_obj=CustomObjArgument(custom_obj_name))
706707
else:
707708
raise SerializeError(f"Unsupported argument type: {type(arg)}")

exir/sym_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def eval_upper_bound(maybe_symint: Union[int, torch.SymInt]) -> Optional[int]:
4242
var_range: ValueRanges = bound_sympy(expr, shape_env.var_to_range)
4343
upper_bound = var_range.upper
4444
if isinstance(upper_bound, sympy.Integer):
45-
concrete_upper = int(var_range.upper) # pyre-ignore
45+
concrete_upper = int(var_range.upper)
4646
assert isinstance(
4747
concrete_upper, int
4848
), f"Expect upper bound to be a concrete int but got {concrete_upper}"

exir/tests/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ def __init__(self) -> None:
193193
super().__init__()
194194

195195
def forward(self, input: Tensor, sections: int, dim: int = 0) -> List[Tensor]:
196+
# pyre-fixme[7]: Expected `List[Tensor]` but got `Tuple[Tensor, ...]`.
196197
return torch.tensor_split(input, sections, dim)
197198

198199

0 commit comments

Comments
 (0)