From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8134C38533F8; Fri, 16 Dec 2022 15:06:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8134C38533F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671203216; bh=x50pAh6pkWsgmOK5a8fdMvM6n5XEVCkTAG6gUauOhao=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PhK0XqmbNvYlFsMpbXFuOs27cc0fAw1sYcJjJK3cSfHhqBjrzjPIkSVAbbl8dFLxP O5wuCnmvYUu7gbv6pG7ZWuZM5bswvfSZ1XumzPMFejxondPpaDzyZf9ma1/5QlMOJY Vn3D6GnSusIpiyT0DbADrZwkkxvxtjPoiy5mm2Wo= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/108098] OpenMP/nvptx reverse offload execution test FAILs Date: Fri, 16 Dec 2022 15:06:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108098 --- Comment #4 from Tobias Burnus --- Indeed, the following seems to also help with an older CUDA / JIT compiler. Motivated by Thomas' work. If we are sure that CUDA 11.0 fixes it, we could generate that code only fo= r: if (version2[0] < 7 || sm_ver2[0] < 8) given that sm_80 is only supported since CUDA 11.0 and, likewise, CUDA 11.0 introduces PTX ISA version 7.0. --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@ -358,4 +358,9 @@ process (FILE *in, FILE *out, uint32_t omp_requires) fprintf (out, "\"\n\t\".file 1 \\\"\\\"\"\n"); + fprintf (out, "\n\t\".func __dummy$func ( );\"\n"); + fprintf (out, "\t\".func __dummy$func ( )\"\n"); + fprintf (out, "\t\"{\"\n"); + fprintf (out, "\t\"}\"\n"); + size_t fidx =3D 0; for (id =3D func_ids; id; id =3D id->next)=