Skip to content

Fix unittests failures introduced from D69212362 #8278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions exir/emit/test/test_emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ def test_non_const_buffer_sizes(self) -> None:
class Add(torch.nn.Module):
def forward(self, x: torch.Tensor) -> torch.Tensor:
b = 3 + 1
return x + b
return x + torch.tensor(b)

f = Add()

Expand Down Expand Up @@ -1325,7 +1325,10 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:

# Find the multiplication node in the graph that was emitted.
for node in program_mul.exported_program().graph.nodes:
if node.target == torch.ops.aten.mul.out:
if (
node.target == torch.ops.aten.mul.out
or node.target == torch.ops.aten.mul.Scalar_out
):
break
self.assertIsNotNone(node)

Expand Down
3 changes: 0 additions & 3 deletions exir/program/test/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
).exported_program()
for node in ep.graph.nodes:
self.assertNotEqual(node.op, "get_attr")
self.assertEqual(
len([node for node in ep.graph.nodes if node.op == "placeholder"]), 2
)

def test_constraint_present_after_dce(self):
import executorch.exir as exir
Expand Down
Loading