GitHubEmploy commited on
Commit
2e29602
·
1 Parent(s): 17d25c3

Create tpuaddcode.py

Browse files
Files changed (1) hide show
  1. tpuaddcode.py +6 -0
tpuaddcode.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import torch_xla
2
+ import torch_xla.core.xla_model as xm
3
+
4
+ second_dev = xm.xla_device(n=2, devkind='TPU')
5
+ t2 = torch.zeros(3, 3, device = second_dev)
6
+ print(t2)