gramineproject / examples

Sample applications configs for Gramine
BSD 3-Clause "New" or "Revised" License
29 stars 22 forks source link

torch.cuda.is_available() #97

Closed lei330326 closed 2 months ago

lei330326 commented 3 months ago

The result of executing torch.cuda.is_available() on my computer is TRUE but the result of executing it in sgx is False. What is the reason?

/home/hh/miniconda3/envs/gyl/lib/python3.8/site-packages/torch/cuda/init.py:88: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 304: OS call failed or operation not supported on this OS (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.) return torch._C._cuda_getDeviceCount() > 0 False

dimakuv commented 3 months ago

What are you trying to achieve? CUDA is a GPU programming platform. Intel SGX and Gramine do not support GPUs.