https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> Lightly tested patch.

Just quick manually testing "for-3.c" (I tried -O0 and -O3):

* With nvptx offloading, it compiles + links – but at run time, I get on two
systems:

  libgomp: cuLaunchKernel error: too many resources requested for launch

and, on the third system, a SEGFAULT – which sounds as if it could be the same
issue:

#0  memcpy () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:145
#1  0x00007ffff63b2552 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
when executing  libgomp/plugin/plugin-nvptx.c:2004
2004      r = CUDA_CALL_NOCHECK (cuLaunchKernel, function, teams, 1, 1,


* For amdgcn, I get at startup:
...
GCN debug: Released kernel dispatch: 0x7eb350
GCN debug: Copying 6000 bytes from host (0x7730c0) to device 0 (0x7ffeed8194d0)
GCN warning: Could not find symbol for kernel in the code object
Runtime message: HSA_STATUS_ERROR_INVALID_SYMBOL_NAME: There is no symbol with
the given name.
not found name: 'test_d_normal._omp_fn.0.kd'
...
not found name: 'test_d_ds128_normal._omp_fn.0.kd'
not found name: 'test_ds_normal._omp_fn.0.kd'
...

[The .kd" comes from plugin/plugin-gcn.c's:  sprintf (buf, "%s.kd",
kernel->name); ]

(I am now doing a full bootstrap now to ensure that that wasn't due to the
incremental build.)

Reply via email to