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]Allow constructor to take canvas. #5983

Merged
merged 6 commits into from
Jan 5, 2022
Merged

Conversation

lina128
Copy link
Collaborator

@lina128 lina128 commented Jan 5, 2022

This feature allows users to use their own canvas, so that they have full control for downstream image processing. This feature can be used both in main thread and workers. When used in workers, user can pass an offscreenCanvas to worker. Note that, we recommend doing all the processing work (ML and image processing) in one context and one worker. Users should only render to canvas in the last step, which is lossy (canvas can only render uint8 data ranging from 0 - 255). We support keeping data on GPU (PR: #5953), which means all the ML and image processing can happen on GPU without having to download data to CPU and re-upload.

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


This change is Reviewable

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: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128)


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

  beforeAll(() => {
    flag = tf.env().getBool('WEBGL_CPU_FORWARD');

webgl_cpu_forward flag is not set to false?

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: :shipit: complete! 1 of 1 approvals obtained (waiting on @pyu10055)


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

Previously, pyu10055 (Ping Yu) wrote…

webgl_cpu_forward flag is not set to false?

In nightly, we test cpu_forward = true too.

@lina128 lina128 merged commit dab6d2c into tensorflow:master Jan 5, 2022
@lina128 lina128 deleted the backend branch January 5, 2022 22:19
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