Skip to content
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

[one-optimize] Remove unnecessary Cast Op #13760

Closed
wants to merge 23 commits into from

Conversation

jiwaszki
Copy link
Contributor

This is a draft that introduces RemoveUnnecessaryCastPass which removes Cast operations with the same input and output types.

For issue #13623

This commit adds RemoveUnnecessaryCastPass that eliminates Cast nodes which have the same input and output dtype.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds an option for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds one-cmd option for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds Net_Unnecessary_Cast tflite recipes.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds value tests for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit is adding circle2circle dredd test for unwanted Cast removal.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
@jiwaszki jiwaszki changed the title [draft][one-optimize] Remove unnecessary Cast Op [one-optimize] Remove unnecessary Cast Op Aug 28, 2024
@jiwaszki
Copy link
Contributor Author

@seanshpark @jinevening PR is ready to review.

Comment on lines 479 to 482
if (_options->query(Options::Algorithm::RemoveUnnecessaryCast))
{
phase.emplace_back(std::make_unique<luci::RemoveUnnecessaryCastPass>());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: update with regards to #13800 when it's merged

@seanshpark
Copy link
Contributor

LGTM

1 similar comment
@jinevening
Copy link
Contributor

LGTM

@jiwaszki jiwaszki marked this pull request as ready for review August 28, 2024 09:32
@jiwaszki jiwaszki marked this pull request as draft August 28, 2024 09:32
@jinevening
Copy link
Contributor

LGTM Could you post PRs?

This commit adds an option for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds RemoveUnnecessaryCastPass that eliminates Cast nodes which have the same input and output dtype.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds one-cmd option for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds Net_Unnecessary_Cast tflite recipes.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit adds value tests for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
This commit is adding circle2circle dredd test for unwanted Cast removal.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>
@jiwaszki
Copy link
Contributor Author

jiwaszki commented Sep 2, 2024

@jinevening sure, I have added you as a reviewer in all of them. Also updated this one to align with all of them.

@jiwaszki
Copy link
Contributor Author

jiwaszki commented Sep 6, 2024

All child PRs has been merged.

@jiwaszki jiwaszki closed this Sep 6, 2024
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