0

Recently,I upgraded my Ubuntu from 22.04 to 24.04 and found the performence of my trained deep network written by torch degrade. After debug, I found the problem is copying data from one gpu to another. The test code:

a=np.ones([2,64,1500,800]).astype('float32')
a=torch.from_numpy(a)
b=a.to('cuda:0').to('cuda:1')
c=a.to('cuda:0').cpu().to('cuda:1')
print(torch.min(b))  ### 0
print(torch.min(c))  ### 1

The value of b is very strange. Some values of entries in b are 0 and the others are 1. Can someone give the reasons?

1
  • Your code runs correctly on my device; have you tried testing it on two different docker images (i.e., ubuntu 22.04 and ubuntu 24.04)? Commented Jul 4 at 0:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.