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

Wallclock comparison for the benchmarks #44

Open
sai-prasanna opened this issue Nov 22, 2023 · 2 comments
Open

Wallclock comparison for the benchmarks #44

sai-prasanna opened this issue Nov 22, 2023 · 2 comments

Comments

@sai-prasanna
Copy link

It would be helpful to have wallclock comparions for the benchmarks you had posted. I think Danijar's jax implementation uses jax scan heavily to make the imagination/rollouts loops efficient.

@sai-prasanna sai-prasanna changed the title Wallclock comparison for the benchmark comparisons Wallclock comparison for the benchmarks Nov 22, 2023
@Caixy1113
Copy link

Hi sai,Have you test the wall clock of this implementation? It seems much slower than the article says.

@NM512
Copy link
Owner

NM512 commented Jan 8, 2024

@sai-prasanna

Hello,

Thank you for your suggestion regarding wallclock comparisons for my benchmarks. You're absolutely right about the efficiency of Danijar's JAX implementation, particularly the use of the jax.scan function for optimizing imagination and rollout loops. This is indeed a significant factor in the performance of their implementation.

Regarding my PyTorch-based implementation, one of the key reasons it might not match the speed of the original JAX version is due to the absence of a directly comparable, efficient scan function in PyTorch.
Ofcourse implementing raw cuda kernel is one of the option to optimize the efficiency.

However, fortunatelly there is a development in the pipeline for efficient scan function and it seems available in near future as discussed in the PyTorch GitHub issue 50688.

Once this function is released, I plan to integrate it into our implementation. In the meantime, for insights into the current efficiency of the code, you might find this discussion useful.

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

No branches or pull requests

3 participants