-
Notifications
You must be signed in to change notification settings - Fork 23
Allow BP to work on gpus and various kwarg improvements #253
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
Merged
Conversation
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
mtfishman
reviewed
Aug 17, 2025
mtfishman
reviewed
Aug 17, 2025
mtfishman
reviewed
Aug 18, 2025
mtfishman
reviewed
Aug 18, 2025
mtfishman
reviewed
Aug 18, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
Co-authored-by: Matt Fishman <[email protected]>
Co-authored-by: Matt Fishman <[email protected]>
mtfishman
reviewed
Aug 19, 2025
…rNetworks.jl into BP_GPU_and_Improvements
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
mtfishman
reviewed
Aug 19, 2025
|
@JoeyT1994 it looks like you need to update the compat entries for ITensorNetworks to v0.14 in |
Co-authored-by: Matt Fishman <[email protected]>
…rNetworks.jl into BP_GPU_and_Improvements
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 adds GPU support for the
BeliefPropagationCache, allowing the structure to beadaptedto GPUs via overload of theadapt_structurefunction on both the tensor network and underlying messages. In doing so,adapthas been made a core dependency of the library and is no longer a weak dependency.Moreover a
custom_devicemessage update alg has been defined which allows the tensors in a message update to be passed to a designated device (such as GPU) and then brought back to the device the tensors were originally on after contraction.To enable these features, the
kwargsof the BP code have been improved such that they are expected to be passed as kwargs inside the algorithmstructspecified for BP. E.g.update(bp_cache; alg = Algorithm("bp"; maxiter = , tol = , edge_sequence = ....)). A reasonable default is defined.Meanwhile the
message_updatemethod can be passed asmessage_update_alg = Algorithm("contract"; kwargs...)with the relevant kwargs contained within there.The following code is now supported