[Ubuntu] What version of CUDA/PyTorch/etc. can run on a Nvidia GTX 680 (compute capability=3.0)

I’m having a rough go of trying to get pytorch to work on my PC. I’m running Ubuntu 20.04 with a Nvidia GTX 680. It’s old, but generally works for most things.

Could someone give me the newest version numbers that will work on this setup? I’ve tried CUDA 11.2 and 10.2 with PyTorch 1.8.1 and 1.5.0 (among a host of others) to no avail so far.

You could compile PyTorch from source using CUDA10.2 (which should support sm_30) as described here.

1 Like

Thanks for the reply! It seems like two problems emerge when trying to build the latest PyTorch with CUDA 10.2 – ./torch/cuda/__init.py#L59-L83 causes it to fail for anything under sm_30 as does ./torch/utils/cpp_extension.py#L1522-L1535

That’s a good finding as I wasn’t sure what the current min. compute capability is.
In that case sm_30 won’t work, unfortunately.

:wink: the secret is a “<” and a couple of "3.0"s
1.) In ./torch/cuda/init.py#L80 change

if capability == (3, 0) or major < 3:

to

if capability < (3, 0) or major < 3:
  1. In ./torch/utils/cpp_extension.py#L1522-L1535 change
    named_arches = collections.OrderedDict([
        ('Kepler+Tesla', '3.7'),
        ('Kepler', '3.5+PTX'),
        ('Maxwell+Tegra', '5.3'),
        ('Maxwell', '5.0;5.2+PTX'),
        ('Pascal', '6.0;6.1+PTX'),
        ('Volta', '7.0+PTX'),
        ('Turing', '7.5+PTX'),
        ('Ampere', '8.0;8.6+PTX'),
    ])

    supported_arches = ['3.5', '3.7', '5.0', '5.2', '5.3', '6.0', '6.1', '6.2',
                        '7.0', '7.2', '7.5', '8.0', '8.6']
    valid_arch_strings = supported_arches + [s + "+PTX" for s in supported_arches]

to

    named_arches = collections.OrderedDict([
        ('Kepler+Tesla', '3.7'),
        ('Kepler', '3.0;3.5+PTX'),
        ('Maxwell+Tegra', '5.3'),
        ('Maxwell', '5.0;5.2+PTX'),
        ('Pascal', '6.0;6.1+PTX'),
        ('Volta', '7.0+PTX'),
        ('Turing', '7.5+PTX'),
        ('Ampere', '8.0;8.6+PTX'),
    ])

    supported_arches = ['3.0','3.5', '3.7', '5.0', '5.2', '5.3', '6.0', '6.1', '6.2',
                        '7.0', '7.2', '7.5', '8.0', '8.6']
    valid_arch_strings = supported_arches + [s + "+PTX" for s in supported_arches]

Then it works just fine. Tested it this evening myself :slight_smile: