1

I have PyTorch tensors in the GPU, which I would like to convert to Tensorflow 1.x tensors without ever leaving the GPU.

I don't care about passing gradients back and forth. I just want the tensor to stay in the GPU. I don't care if my PyTorch tensor is copied to a TF tensor or modified in place.

I am aware that I can convert to numpy on the CPU and reload onto the GPU. However, I must stay on GPU for speed.

Joseph Turian
  • 15,430
  • 14
  • 47
  • 62
  • Have you checked [this](https://www.tensorflow.org/tutorials/customization/basics#device_names), might be what you need? – Innat Mar 14 '21 at 20:03
  • @M.Innat Unfortunately, I don't think it has the information I need, and if it did it would be tf=>pytorch, not the other way around. – Joseph Turian Mar 15 '21 at 00:15

0 Answers0