16 lines
385 B
Python
16 lines
385 B
Python
import torch
|
|
|
|
# tensor_1 = torch.randn(1, 1, 40, 128).to('xpu')
|
|
# tensor_2 = torch.randn(1, 1, 128, 40).to('xpu')
|
|
# print(tensor_1)
|
|
# print(tensor_2)
|
|
# print(torch.matmul(tensor_1, tensor_2).size())
|
|
|
|
print(torch.xpu.is_available())
|
|
print(torch.xpu.get_device_name(0))
|
|
|
|
x = torch.rand(5, 99999).to('xpu')
|
|
print(x)
|
|
|
|
print(torch.xpu.memory_allocated())
|
|
print(torch.xpu.memory_reserved())
|