Nvcc fatal: unsupported gpu architecture

Hello, my compiling GPU is Tesla T4, which is sm_75, CUDA verison 11.0, driver version 450.102.04
I try to compile an application on T4 and execute it on A100 (sm_80), so I add -gencode arch=compute_80,code=sm_80 while compiling ,and it build with error:

nvcc fatal   : Unsupported gpu architecture 'compute_80'

I tried to compile with higher version of CUDA (11.1), but it still get an error, it seems that compile limit of architecture not depend on the CUDA version.
I want to know if there is way to build this application with lower architecture and execute it on higher one.

Are you building your app with CUDA 10.2?

In which case, also add a -gencode arch=compute_75,code=compute_75 to build your app with a PTX slice, that will run on your Ampere hardware.

Please make sure that you’re using the right CUDA in the path to have -gencode=arch=compute_80,code=sm_80 working too.