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

[webgl] Refactor texture return type to return the actual texShape with the WebGLTexture #5949

Merged
merged 5 commits into from
Dec 16, 2021

Conversation

lina128
Copy link
Collaborator

@lina128 lina128 commented Dec 16, 2021

The texShape in texData may not be the actual texShape when the texture is created. This PR add a wrapper to the WebGLTexture type with our own defined Texture type, which contains WebGLTexture and a texShape, this texShape will be the actual texShape used when creating this texture. This PR prepares for a future change where we can return a texture to user to use directly, in which case user needs to know the actual texShape to be able to use it properly.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@lina128 lina128 requested a review from pyu10055 December 16, 2021 00:57
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.

Reviewable status: 0 of 1 approvals obtained (waiting on @lina128)


tfjs-backend-webgl/src/gpgpu_context_test.ts, line 57 at r1 (raw file):

      it('sets the output texture property to the output texture', () => {
        texture = gpgpu.createFloat32MatrixTexture(1, 1).texture;

should we add the texShape validation to these tests? or add new tests that ensure the texShape is correctly set by the creation methods.

Copy link
Collaborator Author

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)


tfjs-backend-webgl/src/gpgpu_context_test.ts, line 57 at r1 (raw file):

Previously, pyu10055 (Ping Yu) wrote…

should we add the texShape validation to these tests? or add new tests that ensure the texShape is correctly set by the creation methods.

Done.

Code quote:

sets the output texture property to the output texture

@lina128 lina128 requested a review from pyu10055 December 16, 2021 18:30
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 3 of 7 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@lina128 lina128 merged commit 534623d into tensorflow:master Dec 16, 2021
@lina128 lina128 deleted the refactor branch December 16, 2021 22:07
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.

2 participants