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

webgpu: upgrade webgpu/types #7528

Merged
merged 3 commits into from
Mar 29, 2023
Merged

Conversation

qjia7
Copy link
Contributor

@qjia7 qjia7 commented Mar 29, 2023

This PR also uses the platform supported max buffer size, otherwise the limit is 256M.
Meanwhile, it removes expired which is not supported anymore.

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


This change is Reviewable

@qjia7
Copy link
Contributor Author

qjia7 commented Mar 29, 2023

@shaoboyan Please take a look the changes in FromPixels.ts.

fromPixels2DContext =
document.createElement('canvas').getContext(
'2d', {willReadFrequently});
fromPixels2DContext = document.createElement('canvas').getContext(
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a format, right?

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, it's automatically adjusted.

Copy link
Contributor

@shaoboyan shaoboyan left a comment

Choose a reason for hiding this comment

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

LGTM for the importExternalTexturerelated changes.

backend.device.importExternalTexture(externalTextureDescriptor));
}

const externalTextureDescriptor = {source: pixels as HTMLVideoElement};
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Remove externalTextureDescriptor, use backend.device.importExternalTexture({source: pixels as HTMLVideoElement})?

Copy link

@gyagp gyagp left a comment

Choose a reason for hiding this comment

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

LGTM

@qjia7 qjia7 merged commit ab53a8f into tensorflow:master Mar 29, 2023
@qjia7 qjia7 deleted the upgrade_webgputypes branch March 30, 2023 07:41
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.

4 participants