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 all dataSync with arraySync #229

Open
JasonShin opened this issue Apr 8, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@JasonShin
Copy link
Member

commented Apr 8, 2019

  • I'm submitting a ...
    [/] enhancement

  • Summary
    As a result of upgrading the Tensorflow version to 0.15.1, we should refactor all the dataSycn with arraySync. This will greatly improve the overall readability of the code.

@nsthorat

This comment has been minimized.

Copy link

commented Apr 24, 2019

Just so you know arraySync will be slower than dataSync (it creates a regular JS array that is nested, whereas dataSync just returns the internal Float32Array representation).

Also, in practice you should try to use the async version if you care about performance. In the future we likely will have backends that don't even support dataSync (like WebGPU).

Cheers, and awesome work on this project :)

@JasonShin

This comment has been minimized.

Copy link
Member Author

commented Apr 30, 2019

Thanks for the suggestion @nsthorat. We agree with you that async API will be necessary because we do care about performance. We are going to do further planning on how to design our API to support this smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.