Package: gcc-12-offload-nvptx Version: 12.2.0-5 Severity: grave Justification: renders package unusable for nvidia
Dear Maintainer, the nvptx plugin for gcc-12 currently available for sid mandates a cuda level sm_30, which is no longer available in cuda 11 (the one now in sid). This means that even a trivial example code like #include <omp.h> #include <stdio.h> int main(int argc, char **argv){ #pragma omp target parallel { int i, j; i = omp_get_thread_num(); j = omp_get_num_threads(); printf("Hello world! I am thread %d out of %d\n", i, j); } } fails to compile with capitanata:~/test$ gcc-12 -fopenmp test_openmp_2.c ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name' nvptx-as: ptxas returned 255 exit status mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-12 returned 1 exit status compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/12//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status even trying to set a specific target gpu arch does not seem to work, e.g. gmulas@capitanata:~/test$ gcc-12 -fopenmp -foffload-options="-misa=sm_35" test_openmp_2.c ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name' nvptx-as: ptxas returned 255 exit status mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-12 returned 1 exit status compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/12//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status On the other hand, gcc-11 appears to have sm_35 as default, meaning it works, both with and without the -misa option: capitanata:~/test$ gcc-11 -fopenmp -foffload="-misa=sm_35" test_openmp_2.c /usr/bin/ld: /tmp/user/1000/ccY5a4YE.crtoffloadtable.o: warning: relocation against `__offload_vars_end' in read-only section `.rodata' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE capitanata:~/test$ gcc-11 -fopenmp test_openmp_2.c /usr/bin/ld: /tmp/user/1000/ccHibGBc.crtoffloadtable.o: warning: relocation against `__offload_vars_end' in read-only section `.rodata' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE and the resulting code runs: capitanata:~/test$ ./a.out Hello world! I am thread 4 out of 8 Hello world! I am thread 1 out of 8 Hello world! I am thread 6 out of 8 Hello world! I am thread 7 out of 8 Hello world! I am thread 0 out of 8 Hello world! I am thread 5 out of 8 Hello world! I am thread 2 out of 8 Hello world! I am thread 3 out of 8 Would it be possible to change the default -misa of gcc 12 to sm_35, to enable gpu offloading to nvidia to work with gcc-12? And/or, is there some undocumented, or poorly documented, way to actually specify on the command line the requested cuda level architecture so that it works with cuda 11 libraries? Thanks in advance Best regards Giacomo Mulas -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (401, 'unstable'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.19.0-2-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gcc-12-offload-nvptx depends on: ii gcc-12 12.2.0-5 ii gcc-12-base 12.2.0-5 ii libc6 2.35-3 ii libc6-dev 2.35-3 ii libgmp10 2:6.2.1+dfsg1-1.1 ii libgomp-plugin-nvptx1 12.2.0-5 ii libmpc3 1.2.1-2 ii libmpfr6 4.1.0-3 ii libzstd1 1.5.2+dfsg-1 ii nvptx-tools 0.20180301-1 ii zlib1g 1:1.2.11.dfsg-4.1 gcc-12-offload-nvptx recommends no packages. gcc-12-offload-nvptx suggests no packages. -- no debconf information