rusty1s / pytorch_sparse

PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations
MIT License
1.01k stars 147 forks source link

what is the `non_blocking` parameter in `SparseTensor` class #333

Closed Barcavin closed 1 year ago

Barcavin commented 1 year ago

What is the non_blocking parameter in SparseTensor class and how can it affect the data storage of the class?

I am trying to find the documentation but failed so

rusty1s commented 1 year ago

If the data is in pinned memory, you can use to(device, non_blocking=True) for asynchronous device transfers (similar to torch.Tensor.to()).

Barcavin commented 1 year ago

Thanks a lot!