Skip to content

Conversation

Leguark
Copy link
Member

@Leguark Leguark commented Sep 24, 2025

[ENH] Adding PyTorch GPU Support

This PR adds support for PyTorch GPU acceleration by:

  • Implementing a PyTorch backend for tensor operations throughout the codebase
  • Adding GPU device detection and configuration in the backend tensor module
  • Creating PyTorch-compatible implementations of key functions like packbits, to_numpy, and matrix operations
  • Adapting octree generation and dual contouring algorithms to work with PyTorch tensors
  • Ensuring proper tensor conversion between CPU and GPU when needed
  • Implementing tensor-specific operations for both backends to maintain compatibility
  • Adding proper memory management for contiguous arrays in PyTorch

The implementation ensures that operations can run on either CPU or GPU when using the PyTorch backend, with appropriate error handling when CUDA is not available but GPU is requested.

@Leguark Leguark merged commit d6ba230 into main Sep 24, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant