Skip to content

Conversation

@CompRhys
Copy link
Member

@CompRhys CompRhys commented May 22, 2025

Adds a batched vdot to torch_sim.math

@cla-bot cla-bot bot added the cla-signed Contributor license agreement signed label May 22, 2025
---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
@CompRhys
Copy link
Member Author

@t-reents I attempted to copy the changes you added but appear to have failed to do so as I do not match your results.

@t-reents
Copy link
Contributor

Interesting, at first glance it indeed seems to be very similar. Out of curiosity, do you also get better results than the previous version, but different ones compared to mine, or do you not even see any improvement?

One thing that I noticed while having a quick look, you also included the transformation of the forces according to the current deformation:

https://github.com/Radical-AI/torch-sim/blob/cc94facb1c164c8def7823a464cc7711fa956d97/torch_sim/optimizers.py#L1478-L1480

However, you don't use forces in the subsequent steps but rather state.forces. For example:

https://github.com/Radical-AI/torch-sim/blob/cc94facb1c164c8def7823a464cc7711fa956d97/torch_sim/optimizers.py#L1507

and

https://github.com/Radical-AI/torch-sim/blob/cc94facb1c164c8def7823a464cc7711fa956d97/torch_sim/optimizers.py#L1527

@CompRhys
Copy link
Member Author

I saw results very similar to what's currently on main

@CompRhys
Copy link
Member Author

updating to use forces everywhere wasn't a fix sadly

@t-reents
Copy link
Contributor

I will have a more detailed look tomorrow, already dedicated some time for it. I'll also double once again check if there are any additional changes on my side that I didn't properly, but in principle it shouldn't be the case.

@t-reents
Copy link
Contributor

Already had a quick look. I can reproduce my results (on my branch, so what I shared should be complete). Moreover, when I just checkout your branch and run the script, I get the same results as on my branch, see attached screenshot. Based on this test, it seems that you reproduce my results, doesn't it?

image

@CompRhys
Copy link
Member Author

closing in favor of #203!

@CompRhys CompRhys closed this May 28, 2025
@janosh janosh deleted the batched-vdot branch June 10, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Contributor license agreement signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants