ljy266987 commited on
Commit
d2f567c
1 Parent(s): 626d949
Files changed (1) hide show
  1. spaces/zero/torch.py +2 -2
spaces/zero/torch.py CHANGED
@@ -241,14 +241,14 @@ if (torch := maybe_import_torch()):
241
  bitsandbytes.unpatch()
242
 
243
  def _move(nvidia_uuid: str):
244
- os.environ['CUDA_VISIBLE_DEVICES'] = "0,1,2,3,4,5"
245
  import subprocess
246
  subprocess.run(
247
  ['nvidia-smi'], text=True
248
  )
249
 
250
  print("_move(nvidia_uuid: str)")
251
- torch.Tensor([0]).cuda() # CUDA init
252
  for op in to_ops.items():
253
  tensor, parsed_args = op
254
  _, dtype, _, memory_format = parsed_args
 
241
  bitsandbytes.unpatch()
242
 
243
  def _move(nvidia_uuid: str):
244
+ os.environ['CUDA_VISIBLE_DEVICES'] = "5,8,10,11,14,15"
245
  import subprocess
246
  subprocess.run(
247
  ['nvidia-smi'], text=True
248
  )
249
 
250
  print("_move(nvidia_uuid: str)")
251
+ torch.Tensor([5]).cuda() # CUDA init
252
  for op in to_ops.items():
253
  tensor, parsed_args = op
254
  _, dtype, _, memory_format = parsed_args