Skip to content

Commit 5851f5a

Browse files
committed
Apply ufmt
1 parent 775a436 commit 5851f5a

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎backends/vulkan/_passes/conv1d_as_conv2d.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ def _rewrite(self, graph: torch.fx.Graph, node: torch.fx.Node) -> None:
119119
set_param_tensor(
120120
self._exported_program, weight_node, weight.reshape(w_4d_shape)
121121
)
122-
weight_node.meta["val"] = _reshape_fake(
123-
weight_node.meta["val"], w_4d_shape
124-
)
122+
weight_node.meta["val"] = _reshape_fake(weight_node.meta["val"], w_4d_shape)
125123

126124
with graph.inserting_before(node):
127125
in_4d = graph.call_function(view, args=(in_node, in_4d_shape))

‎backends/vulkan/test/test_vulkan_passes.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def run_conv1d_as_conv2d(
9898
)
9999
edge_program = to_edge(
100100
program,
101-
compile_config=EdgeCompileConfig(_skip_dim_order=False, _check_ir_validity=False),
101+
compile_config=EdgeCompileConfig(
102+
_skip_dim_order=False, _check_ir_validity=False
103+
),
102104
)
103105
exported = edge_program.exported_program()
104106

@@ -129,9 +131,7 @@ def __init__(self):
129131
def forward(self, x):
130132
return self.conv(x)
131133

132-
gm = run_conv1d_as_conv2d(
133-
Conv1dModule(), (torch.randn(1, 32, 64),)
134-
)
134+
gm = run_conv1d_as_conv2d(Conv1dModule(), (torch.randn(1, 32, 64),))
135135

136136
self.assertEqual(conv_input_ranks(gm), [4])
137137
# Two views: one lifting the input to 4-D, one lowering the output back.

0 commit comments

Comments
 (0)