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

Refactor type conversion for read back #7044

Merged
merged 3 commits into from Dec 9, 2022

Conversation

axinging
Copy link
Contributor

@axinging axinging commented Nov 14, 2022

Bug: #6965


This change is Reviewable

@axinging axinging force-pushed the checkTypedArrayName branch 2 times, most recently from d9e4e0c to 1a59012 Compare November 14, 2022 07:17
@axinging axinging changed the title [e2e] Add type check for TypedArray [cpu] Add type conversion for CPU read Nov 14, 2022
@axinging axinging force-pushed the checkTypedArrayName branch 3 times, most recently from dcc1463 to 3a4e1f4 Compare November 24, 2022 06:18
@axinging axinging changed the title [cpu] Add type conversion for CPU read Refactor type conversion for read back Nov 24, 2022
@axinging axinging marked this pull request as ready for review November 24, 2022 06:58
@axinging
Copy link
Contributor Author

@qjia7 @xhcao @haoyunfeix @gyagp PTAL

Copy link
Collaborator

@qjia7 qjia7 left a comment

Choose a reason for hiding this comment

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

Based on #6965's description, it seems that ResizeNearestNeighbor doesn't create the right TypedArray buffer based on dType. Should we fix it there or do the post processing to cast the data to the right type when reading data back like other backends? @pyu10055 @mattsoulanille

@axinging
Copy link
Contributor Author

axinging commented Dec 5, 2022

@pyu10055 @mattsoulanille, PTAL

This PR can fix DeepLabV3(in e2e) failure.

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

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

Thanks for the ping @axinging, and sorry for not seeing this earlier. This approach looks good to me.

I think we should also fix ResizeNearestNeighbor. Like you said in #6965, it's incorrectly handling the dtype. I can do this in another PR.

@axinging
Copy link
Contributor Author

axinging commented Dec 7, 2022

Thanks @mattsoulanille.
@pyu10055 , Do you have any idea about this change?

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1.
Reviewable status: :shipit: complete! 2 of 1 approvals obtained

@pyu10055 pyu10055 merged commit b92f803 into tensorflow:master Dec 9, 2022
Linchenn pushed a commit to Linchenn/tfjs that referenced this pull request Jan 9, 2023
* Refactor type conversion for read back

Bug: tensorflow#6965

* Cleanup

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
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.

None yet

4 participants