I want to test run some finite-difference time domain (FDTD) simulations using parallelization on a GPU and compare the speed to CPU-based simulation runs. This is basically my very first attempt at using GPU acceleration for scientific computing.

My system configuration:

CPU: Intel Core i7-4930K @ 3.40 GHz
GPU: Gigabte GeForce GTX 1650 OC LP 4.0 GB
RAM: 32.0 GB (16.0 GB usable)
OS: Windows 7 Home Premium 64-bit

This GPU has 896 CUDA cores and compute capability 7.5, so I'm expecting a significant acceleration when compared to running my simulation on "only" 12 CPU cores.

The simulation script uses the fdtd simulation package and I'm using Jupyter notebooks for convenience. If you're interested in some actual code reference, I can recommend taking a look at the short example scripts on the fdtd GitHub page.

I've installed the CUDA ToolKit version 10.2 as this appears to be the last version with Windows 7 support. Version 11.0+ appears to support Windows 10+ only, at least according to the download page (can anyone confirm this?).

I've also installed torch + torchvision + torchaudio, simply because PyTorch includes these packages during installation procedure. However, I got stuck when trying to install the Python CUDA ToolKit as it seems to require another package called nvidia-pyindex, which is not available for Windows. Moreover, I'm confused by the PyTorch installation command for CUDA 10.2 which says "CUDA-10.2 PyTorch builds are no longer available for Windows, please use CUDA-11.6", especially since they clearly state:

Supported Windows Distributions

PyTorch is supported on the following Windows distributions:

Windows 7 and greater; Windows 10 or greater recommended. Windows Server 2008 r2 and greater

In the Python interpreter, I'm getting

Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()

and trying to set the CUDA backend in the simulation package returns

import fdtd


RuntimeError                              Traceback (most recent call last)
Input In [3], in <cell line: 35>()
     31 display(HTML("<style>.container {width:100% !important;}</style>"))
     33 #fdtd.set_backend("numpy")
     34 #fdtd.set_backend("torch.float64")
---> 35 fdtd.set_backend("torch.cuda.float64")

File C:\Program Files\Python38\lib\site-packages\fdtd\backend.py:376, in set_backend(name)
    374     raise RuntimeError("Torch backend is not available. Is PyTorch installed?")
    375 if name.startswith("torch.cuda") and not TORCH_CUDA_AVAILABLE:
--> 376     raise RuntimeError(
    377         "Torch cuda backend is not available.\n"
    378         "Do you have a GPU on your computer?\n"
    379         "Is PyTorch with cuda support installed?"
    380     )
    382 if name.count(".") == 0:
    383     dtype, device = "float64", "cpu"

RuntimeError: Torch cuda backend is not available.
Do you have a GPU on your computer?
Is PyTorch with cuda support installed?

How should I progress from here?

1 Answer 1


You appear to be at an impasse.

Your tools clearly have a chain of dependencies that require a newer version of Windows.

Python CUDA toolkit wants CUDA >= 11.6
You have installed a previous version of CUDA (10.2)

You should install CUDA 11.6. If it is not supported on Windows 7 (which is why you are trying to use 10.2) then you need to upgrade to a newer version of Windows and then an updated version of CUDA.

Windows 7 has been out of support since January 14, 2020. It might be a good workhorse for older tools that haven't been updated but clinging to it while the world moves on around you is not worth the pain or effort.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.