다음 코드 돌려보면 cpu일 때랑 mps일 때랑 결과가 다름ㅋㅋ 이거 때문에 몇시간 난리쳤네



import torch
cpu = torch.device("cpu")
device = torch.device("mps" if torch.backends.mps.is_available() and torch.backends.mps.is_built() else "cuda" if torch.cuda.is_available() else "cpu")
print(device)

x=torch.ones(1).to(cpu)
y=torch.ones(1).to(device)
print(x * 1e-38)
print(x * 1e-37)
print(y * 1e-38)
print(y * 1e-37)