Can pytorch still work on old GPU if build from source?

My environment is

What works:

  • compare running cuda-sample:nbody container on GPU vs CPU shows GPU acceleration is available:
    ** GPU 450.378 single-precision GFLOP/s
    ** CPU 0.626 single-precision GFLOP/s
  • torch.cuda.is_available() returns True.

What doesn’t work:

NVIDIA GeForce 930MX which is of cuda capability 5.0.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability supported by this library is 5.2.

I heard build from source can make old GPU work, so I tried:

python develop

It took a few hours to build, surprisingly there was no error, pytorch is successfully built, thanks to docker.
However, pytorch still does not work on the old GPU.

Can pytorch still work on old GPU if build from source?
Would recompile with TORCH_USE_CUDA_DSA make it work? What other flags should I enable/disable when recompile?

How did you install PyTorch as the latest nightly with CUDA 12.1 should support compute capabilities 5.0+ and the nightly with 11.8 should support 3.7+:

['sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_90']

For me, it returns:
['sm_52', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_90', 'compute_90']
Guess I should use cuda toolkit 11.8 instead.
Thank you very much.