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

Add support for nan_to_num, atan2 & bitwise_or op #57

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

kamalrajkannan78
Copy link
Contributor

@kamalrajkannan78 kamalrajkannan78 commented Jan 6, 2025

Summary

  • PETR model uses nan_to_num op here & atan2 op here
  • Support added for those ops.
  • This PR fixes Operator Not Implemented aten::bitwise_or_  tt-forge-fe#982 by mapping "aten::bitwise_or_": to "bitwise_or"
  • our nan_to_num_decomposition needs isnan. existing decomposition of isnan in forge_passes.py didn't detected NaN values. so updated the decomposition with this logic (a NaN value is not equal to itself) which detects NaN values correctly

Logs

@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/atan_nan_to_num_support_tvm branch from b02be0c to 9939beb Compare January 6, 2025 18:45
@kamalrajkannan78 kamalrajkannan78 changed the title Add support for nan_to_num op Add support for nan_to_num,atan2 op Jan 6, 2025
@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/atan_nan_to_num_support_tvm branch 2 times, most recently from e66c611 to 2924f46 Compare January 7, 2025 10:06
@ashokkumarkannan1 ashokkumarkannan1 changed the title Add support for nan_to_num,atan2 op Add support for nan_to_num, atan2 & bitwise_or op Jan 7, 2025
python/tvm/relay/frontend/pytorch.py Outdated Show resolved Hide resolved
python/tvm/relay/frontend/pytorch.py Show resolved Hide resolved
python/tvm/relay/frontend/pytorch.py Outdated Show resolved Hide resolved
@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/atan_nan_to_num_support_tvm branch 5 times, most recently from 2917d2e to d951607 Compare January 9, 2025 09:54
@kamalrajkannan78 kamalrajkannan78 marked this pull request as ready for review January 9, 2025 12:56
python/tvm/relay/frontend/pytorch.py Show resolved Hide resolved
python/tvm/relay/frontend/pytorch.py Show resolved Hide resolved
python/tvm/relay/frontend/pytorch.py Outdated Show resolved Hide resolved
python/tvm/relay/frontend/pytorch.py Show resolved Hide resolved
@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/atan_nan_to_num_support_tvm branch from d951607 to 5d4e3f4 Compare January 10, 2025 16:15
@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/atan_nan_to_num_support_tvm branch from 5d4e3f4 to 39215fb Compare January 10, 2025 16:18
Copy link
Contributor

@ashokkumarkannan1 ashokkumarkannan1 left a comment

Choose a reason for hiding this comment

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

LGTM

@kamalrajkannan78 kamalrajkannan78 merged commit c566aae into main Jan 15, 2025
9 checks passed
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.

Operator Not Implemented aten::bitwise_or_
3 participants