From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2FB9E3858029; Fri, 2 Feb 2024 15:21:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FB9E3858029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706887293; bh=7lMjhgE2+SCtCAa908Jq4qdXT7/qkcbODDnilmrH2ac=; h=From:To:Subject:Date:From; b=ZA2OZXyAEE6aXjApC0UGFBIrPhb0FVRZ7UKMoL8zrpub9mJerXC9RcrHQXjn/Ggb/ MyTZnmcs7viFT8zPyrefI1YaOwS250+ViQldzknwnVZET9TF9Zkk3cBJ6wC7zxaq3b bLelCtVyoCu0RUx+goI2JMuz4B8j4AidkyfRVYko= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113721] New: [14 Regression][OpenMP][nvptx] cuCtxSynchronize fail when calling 'free' in the target regsion Date: Fri, 02 Feb 2024 15:21:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: openmp, wrong-code 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget attachments.created Message-ID: 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=3D113721 Bug ID: 113721 Summary: [14 Regression][OpenMP][nvptx] cuCtxSynchronize fail when calling 'free' in the target regsion Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: openmp, wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: tschwinge at gcc dot gnu.org Target Milestone: --- Target: nvptx Created attachment 57294 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57294&action=3Dedit Compile with -fopenmp + run with nvptx offloading I have not fully debugged this, but OpenMP Example Document example devices/sources/target_ptr_map.1.c fails now. It works if one comments the 'free(ptr3)' line but with it in, it fails wit= h: libgomp: cuCtxSynchronize error: unspecified launch failure (perhaps abort = was called) libgomp: cuMemFree_v2 error: unspecified launch failure * * * * Fails with today's GCC where nvptx is configured with --with-arch=3Dsm_80. * Fails also with -foffload=3Dnvptx-none=3D-march=3Dsm_30 * Works with AMD GPU offload * Works using the GCC 13 distro compiler * Works using the GCC 13 distro compiler and LD_LIBRARY_PATH set to the mainline compile.=