[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1021660: gcc-12-offload-nvptx: offloading to nvidia via nvptx fails with cuda version 11 (default in sid)



Hi Giacomo!

On 2022-10-13T12:20:19+0200, Giacomo Mulas <giacomo.mulas@inaf.it> wrote:
> On Thu, 13 Oct 2022, Thomas Schwinge wrote:
>
>> Debian need to update nvptx-tools to a version that includes
>> <https://github.com/MentorEmbedded/nvptx-tools/pull/33>
>> "as: Deal with CUDA 11.0, "Support for Kepler 'sm_30' and 'sm_32'
>> architecture based products is dropped"
>
> ok, but I am puzzled by this: if the issue is with nvptx-tools and not with
> gcc-12-offload-nvptx, why does gcc-11-offload-nvptx work, producing working
> executables that target sm_35 if I compile with gcc-11 on the same laptop?

Aha, that's a legit question to wonder about: the reason is that GCC 11
defaulted to sm_35 code generation (which CUDA 11 still does support):
<https://gcc.gnu.org/gcc-11/changes.html#nvptx>, just then GCC 12 again
reverted to sm_30: <https://gcc.gnu.org/gcc-12/changes.html#nvptx>.


Grüße
 Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955


Reply to: