Open
Conversation
Collaborator
Author
|
I'm of a mind to merge this actually. It's not the cleanest implementation possible but there are significant gains here (as mentioned, a 30% speedup with the default settings on |
648961f to
acfe070
Compare
Collaborator
Author
|
Made significant simplifications to the method by subclassing |
Collaborator
Author
|
Merged with trunk + made a few fixes. Pretty happy with this now! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a better way of sharing torch tensors between process by creating (large enough) shared tensors that are created once are used as a transfer mechanism. Doing this on the fragment environment
seh_frag.pyI'm getting a 30% wall time improvement for simple settings, with batch size 64 (I'm sure we could have fun maxing that out and see how far we can take GPU utilization).Some notes:
BatchandGraphActionCategoricalsthrough shared buffers improves timeOther changes:
GFNAlgorithmglobal_cfgis set for all algorithmscond_infois now folded into the batch object rather than being passed as an argument everywhereGraphActionCategorical.entropywhen masks are used, gradients wrt logits would be NaN.Note,
EnvelopeQLis still in a broken state, will fix in #127