https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113721
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=57294&action=edit
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 with:
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=sm_80.
* Fails also with -foffload=nvptx-none=-march=sm_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.