Not able to use torch with NVIDIA Geforce MX130

I have a laptop with Intel UHD card and NVIDIA Geforce MX130. My CUDA version is 12.0
Environment path variable is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0.
torch version 1.13.1.
Please help me with following errors
But torch.cuda.is_available() is shown as false
but for tensor flow
tf.test.is_built_with_cuda() is shown as true
tf.config.experimental.list_physical_devices(‘gpu’) is []

Additional info:

nvcc --version is

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Mon_Oct_24_19:40:05_Pacific_Daylight_Time_2022
Cuda compilation tools, release 12.0, V12.0.76
Build cuda_12.0.r12.0/compiler.31968024_0

from numba import cuda
cuda.detect()

shows

Found 1 CUDA devices
id 0 b’NVIDIA GeForce MX130’ [SUPPORTED]
Compute Capability: 5.0
PCI Device ID: 0
PCI Bus ID: 1
Watchdog: Enabled
Compute Mode: WDDM
FP32/FP64 Performance Ratio: 32
Summary:
1/1 devices are supported

nvidia-smi

shows

±----------------------------------------------------------------------------+
| NVIDIA-SMI 527.41 Driver Version: 527.41 CUDA Version: 12.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … WDDM | 00000000:01:00.0 Off | N/A |
| N/A 0C P8 N/A / N/A | 0MiB / 2048MiB | 1% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+

Could you post the output of python -m torch.utils.collect_env please?

Thanks for the reply. Following is the output

Traceback (most recent call last):
File “C:\Users\Megha\anaconda3\lib\runpy.py”, line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “C:\Users\Megha\anaconda3\lib\runpy.py”, line 111, in get_module_details
import(pkg_name)
File "C:\Users\Megha\anaconda3\lib\site-packages\torch_init
.py", line 139, in
raise err
OSError: [WinError 126] The specified module could not be found. Error loading “C:\Users\Megha\anaconda3\lib\site-packages\torch\lib\caffe2_nvrtc.dll” or one of its dependencies.

By doing above exercise, I also found that my path is C:\Users\Megha\AppData\Local\Microsoft\WindowsApps whereas output of os.path.dirname(sys.executable) is C:\Users\Megha\anaconda3.

Can this be creating some issue? Sorry in advance as I am new to all this and trying to self learn

Based on this topic it seems as if the installation might be corrupt somehow and reinstalling it fixed the issue. Do you see the caffe2_nvrtc.dll in the posted folder?

What is the “posted folder”
Alan

The install folder where the missing .dll should be located.

I have reinstalled torch but again I am facing the same problem. What might be causing faulty installation

Sorry for the confusion but I think I am not able to uninstall torch in the first place.
conda uninstall torch
Collecting package metadata (repodata.json): …working… done
Solving environment: …working… failed

Note: you may need to restart the kernel to use updated packages.

PackagesNotFoundError: The following packages are missing from the target environment:

  • torch

However, output of pip show torch is

ame: torch
Version: 1.13.1
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: packages@pytorch.org
License: BSD-3
Location: c:\users\megha\anaconda3\lib\site-packages
Requires: typing_extensions
Required-by: torchvision, torchaudio
Note: you may need to restart the kernel to use updated packages.

Try to run conda uninstall pytorch instead as this should be the conda package name.