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

Improve CUDA performance of PathData class #99

Closed
IngoScholtes opened this issue Jan 30, 2024 · 2 comments · Fixed by #141
Closed

Improve CUDA performance of PathData class #99

IngoScholtes opened this issue Jan 30, 2024 · 2 comments · Fixed by #141
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@IngoScholtes
Copy link
Member

A major performance bottleneck in the current implementation is the use of a dictionary to store path tensors in the class PathData. This creates a huge performance overhead when using CUDA vs. CPU., as each individual tensor in the dictionary must be copied to the GPU separately.

A better solution could possibly be implemented based on the new nested tensor class available in pyTorch 2.1. This would allow to store all paths with varying lengths in a single nested tensor, i.e. we would only need a single copy operation when moving the data to the GPU.

@IngoScholtes IngoScholtes self-assigned this Jan 30, 2024
@IngoScholtes IngoScholtes added the enhancement New feature or request label Jan 30, 2024
@IngoScholtes IngoScholtes added this to the End of February Demo milestone Jan 30, 2024
@IngoScholtes
Copy link
Member Author

Some good and bad news on this issue:

  • For a test implementation in which I replaced the dictionary in PathData by a nested_tensor the performance of the PathData creation on the GPU increases by a factor of five.
  • The unfold operation, which we need to create edge_indices of k-th order models is not yet implemented for nested_tensors (neither for the CPU nor for GPU backend)

@IngoScholtes IngoScholtes linked a pull request Feb 27, 2024 that will close this issue
@M-Lampert
Copy link
Contributor

This is outdated. For updates on this see #132

@IngoScholtes IngoScholtes linked a pull request Mar 25, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants