It is possible and you can find an example here 942. However, it’s quite hard to do it properly, as PyCuda initializes its own CUDA contexts instead of using a default one, so sometimes you may end up in a situation where PyTorch pointers are inaccessible form PyCuda and vice versa. Be careful with imports and initialization.