https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97348
Bug ID: 97348 Summary: [nvptx] Make -misa=sm_35 the default Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- The gcc objects and executables for nvptx are somewhat funny given that they contain just ptx text. However, during assembling, we do verify that the ptx is valid, by running it through ptxas, if that happens to be available in the path. This step can be skipped by using -Wa,--no-verify, but it's done by default. The system cuda on my system (ubuntu Ubuntu 18.04.5) is V9.1.108, and I can do a build (where the system ptxas will be used for verification). However, if I want to compile something while my path is set to include the most recent cuda (11.1), I get: ... $ c=~/cuda/11.1/bin; ( export PATH=$c:$PATH; /home/vries/nvptx/trunk/build-gcc/gcc/xgcc -B/home/vries/nvptx/trunk/build-gcc/gcc/ -fdiagnostics-plain-output --sysroot=/home/vries/nvptx/trunk/install/nvptx-none -O0 -w -c -isystem /home/vries/nvptx/trunk/build-gcc/nvptx-none/./newlib/targ-include -isystem /home/vries/nvptx/trunk/source-gcc/newlib/libc/include -o pr42717.o /home/vries/nvptx/trunk/source-gcc/gcc/testsuite/gcc.c-torture/compile/pr42717.c ) ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name' nvptx-as: ptxas returned 255 exit status ... By adding -misa=sm_35, the compilation succeeds. For a test-case, it's stil feasible to add this, but not for a build. So, it looks like it's time to make -misa=sm_35 the new default. [ It's good to note that the ptxas code will not actually be executed, and that in the end the installed driver is the one making the translation for execution. So atm my exec using sm_30 is still supported by Long Lived Branch driver version 450.66. ]