jsxlei / SCALE

Single-cell ATAC-seq analysis via Latent feature Extraction
MIT License
97 stars 17 forks source link

How to use gpu to run SCALE #20

Open Telogen opened 2 years ago

Telogen commented 2 years ago

I tried to use GPU to run SCALE by this commond SCALE.py -d a.txt -k 20 --binary --gpu 1 But I got this error:

Traceback (most recent call last):
  File "/opt/conda/bin/SCALE.py", line 71, in <module>
    torch.cuda.set_device(args.gpu)
  File "/opt/conda/lib/python3.8/site-packages/torch/cuda/__init__.py", line 263, in set_device
    torch._C._cuda_setDevice(device)
RuntimeError: CUDA error: invalid device ordinal

Could you please tell me how to use GPU correctly to run SCALE? Many thanks!