Skip to content

Fix mising condition of RemoveRedundantToCopy pass#155

Merged
mhs4670go merged 1 commit intoSamsung:mainfrom
mhs4670go:rel2
Jun 17, 2025
Merged

Fix mising condition of RemoveRedundantToCopy pass#155
mhs4670go merged 1 commit intoSamsung:mainfrom
mhs4670go:rel2

Conversation

@mhs4670go
Copy link
Contributor

This commit considers memory_format in RemoveRedundantToCopy pass and fix related test.

We are supporting only contiguous format now.
TICO-DCO-1.0-Signed-off-by: seongwoo mhs4670go@naver.com

This commit considers memory_format in RemoveRedundantToCopy pass and fix related test.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
@mhs4670go mhs4670go requested a review from a team June 17, 2025 07:20
Copy link
Contributor

@dayo09 dayo09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


self.run_value_test(RemoveRedundantToCopy())
self.assertEqual(num_of_ops(self.exported_program(), ops.aten.to_copy), 0)
self.assertEqual(num_of_ops(self.exported_program(), ops.aten.to_copy), 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After adding this condition for the pass, I see that this test was changed to a negative test.
so, I guess the number of ops.aten.to_copy operations remained unchanged (1 → 1).
Is my understanding correct? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes:)

Copy link

@Seunghui98 Seunghui98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mhs4670go mhs4670go merged commit ccb044a into Samsung:main Jun 17, 2025
5 checks passed
@mhs4670go mhs4670go deleted the rel2 branch June 19, 2025 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants