Does pytouch 1.8 support cuda11.8 under source compilation?

I am using a 4060 video card and the compute power is 8.9. so I need to install cuda11.8 at the minimum. but I need to install pytorch1.8. is there any solution for this? Is it possible to solve it by installing pytorch from source?

The PyTorch 1.8 binary release was shipping with CUDA 10.2 and 11.1. I don’t remember which changes were needed to update to 11.8, but note that your sm_89 GPU is binary compatible with sm_86 and sm_80, so the older release might just work.

Thanks for your answer!
But I get the following error when I run the code:

`RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)

nvrtc compilation failed:

#define NAN __int_as_float(0x7fffffff)
#define POS_INFINITY __int_as_float(0x7f800000)
#define NEG_INFINITY __int_as_float(0xff800000)

template
device T maximum(T a, T b) {
return isnan(a) ? a : (a > b ? a : b);
}

template
device T minimum(T a, T b) {
return isnan(a) ? a : (a < b ? a : b);
}

extern “C” global
void fused_sub_exp(float* t0, float* t1, float* aten_exp) {
{
if (512 * blockIdx.x + threadIdx.x<33200 ? 1 : 0) {
float v = __ldg(t0 + 512 * blockIdx.x + threadIdx.x);
float v_1 = __ldg(t1 + 512 * blockIdx.x + threadIdx.x);
aten_exp[512 * blockIdx.x + threadIdx.x] = expf(v - v_1);
}
}
}
`

nvidia-smi
Sat Mar 2 01:49:25 2024
±----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … Off | 00000000:01:00.0 On | N/A |
| 0% 40C P8 7W / 160W | 384MiB / 8188MiB | 1% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1436 G /usr/lib/xorg/Xorg 176MiB |
| 0 N/A N/A 1697 G /usr/bin/gnome-shell 46MiB |
| 0 N/A N/A 2724 G …6B5B1BC9E56BDE4153AC87FEA 4MiB |
| 0 N/A N/A 3179 G …736815699028964499,262144 153MiB |
±----------------------------------------------------------------------------+

My environment is: cuda11.1, pytorch1.8, 4060ti. what error is happening to me?Thanks for your reply!