[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2020-09-30 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

Tom de Vries  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Tom de Vries  ---
This no longer fails at current trunk.

[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2017-10-27 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

Tom de Vries  changed:

   What|Removed |Added

   Keywords||openmp, patch

--- Comment #5 from Tom de Vries  ---
patch submitted: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02079.html

[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2017-10-27 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

--- Comment #4 from Tom de Vries  ---
(In reply to Tom de Vries from comment #3)
> Created attachment 42484 [details]
> Patch that moves async_run from plugin-hsa.c to default_sync_run
> 
> I wonder if this will work.

That got me this error for target-33.c:
...
libgomp: 
libgomp: cuMemAlloc error: invalid device context
cuMemAlloc error: invalid device context

libgomp: cuCtxPushCurrent_v2 error: unknown cuda error

libgomp: device finalization failed
...

Using this patch in addition, both target-33.c and target34.c pass:
...
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index d5262639578..4e0009f650e 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -2127,6 +2127,8 @@ GOMP_OFFLOAD_run (int ord, void *tgt_fn, void *tgt_vars,
void **args)
   const char *maybe_abort_msg = "(perhaps abort was called)";
   int teams = 0, threads = 0;

+  nvptx_attach_host_thread_to_device (ord);
+
   if (!args)
 GOMP_PLUGIN_fatal ("No target arguments provided");
   while (*args)
...

[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2017-10-27 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

--- Comment #3 from Tom de Vries  ---
Created attachment 42484
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42484&action=edit
Patch that moves async_run from plugin-hsa.c to default_sync_run

I wonder if this will work.

[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2017-08-03 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

--- Comment #2 from Tom de Vries  ---
These tests pass on gomp-4_0-branch, because there GOMP_OFFLOAD_get_caps does
not return GOMP_OFFLOAD_CAP_OPENMP_400, while on trunk it does.

[Bug libgomp/81688] libgomp.c/target-3{3,4}.c fails: GOMP_OFFLOAD_async_run unimplemented for nvptx

2017-08-03 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81688

--- Comment #1 from Tom de Vries  ---
Already mentioned here (
https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00972.html ):
...
With OpenMP/PTX offloading there are 5 additional failures in
check-target-libgomp:



Two with 'target nowait' (not implemented)
FAIL: libgomp.c/target-33.c execution test
FAIL: libgomp.c/target-34.c execution test
...