mirror of git://gcc.gnu.org/git/gcc.git
Add device number to GOMP_OFFLOAD_openacc_async_construct
2019-11-13 Andrew Stubbs <ams@codesourcery.com> Julian Brown <julian@codesourcery.com> libgomp/ * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int parameter. * oacc-async.c (lookup_goacc_asyncqueue): Pass device number to the queue constructor. * oacc-host.c (host_openacc_async_construct): Add device parameter. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add device parameter. Co-Authored-By: Julian Brown <julian@codesourcery.com> From-SVN: r278134
This commit is contained in:
parent
15e9e6795d
commit
d2903ce05b
|
@ -1,3 +1,14 @@
|
|||
2019-11-13 Andrew Stubbs <ams@codesourcery.com>
|
||||
Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int
|
||||
parameter.
|
||||
* oacc-async.c (lookup_goacc_asyncqueue): Pass device number to the
|
||||
queue constructor.
|
||||
* oacc-host.c (host_openacc_async_construct): Add device parameter.
|
||||
* plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add
|
||||
device parameter.
|
||||
|
||||
2019-11-13 Andrew Stubbs <ams@codesourcery.com>
|
||||
|
||||
* configure.tgt (nvptx*-*-*): Add "accel" directory.
|
||||
|
|
|
@ -112,7 +112,7 @@ extern void GOMP_OFFLOAD_openacc_exec (void (*) (void *), size_t, void **,
|
|||
void **, unsigned *, void *);
|
||||
extern void *GOMP_OFFLOAD_openacc_create_thread_data (int);
|
||||
extern void GOMP_OFFLOAD_openacc_destroy_thread_data (void *);
|
||||
extern struct goacc_asyncqueue *GOMP_OFFLOAD_openacc_async_construct (void);
|
||||
extern struct goacc_asyncqueue *GOMP_OFFLOAD_openacc_async_construct (int);
|
||||
extern bool GOMP_OFFLOAD_openacc_async_destruct (struct goacc_asyncqueue *);
|
||||
extern int GOMP_OFFLOAD_openacc_async_test (struct goacc_asyncqueue *);
|
||||
extern bool GOMP_OFFLOAD_openacc_async_synchronize (struct goacc_asyncqueue *);
|
||||
|
|
|
@ -100,7 +100,8 @@ lookup_goacc_asyncqueue (struct goacc_thread *thr, bool create, int async)
|
|||
|
||||
if (!dev->openacc.async.asyncqueue[async])
|
||||
{
|
||||
dev->openacc.async.asyncqueue[async] = dev->openacc.async.construct_func ();
|
||||
dev->openacc.async.asyncqueue[async]
|
||||
= dev->openacc.async.construct_func (dev->target_id);
|
||||
|
||||
if (!dev->openacc.async.asyncqueue[async])
|
||||
{
|
||||
|
|
|
@ -211,7 +211,7 @@ host_openacc_async_queue_callback (struct goacc_asyncqueue *aq
|
|||
}
|
||||
|
||||
static struct goacc_asyncqueue *
|
||||
host_openacc_async_construct (void)
|
||||
host_openacc_async_construct (int device __attribute__((unused)))
|
||||
{
|
||||
/* Non-NULL 0xffff... value as opaque dummy. */
|
||||
return (struct goacc_asyncqueue *) -1;
|
||||
|
|
|
@ -1575,7 +1575,7 @@ GOMP_OFFLOAD_openacc_cuda_set_stream (struct goacc_asyncqueue *aq, void *stream)
|
|||
}
|
||||
|
||||
struct goacc_asyncqueue *
|
||||
GOMP_OFFLOAD_openacc_async_construct (void)
|
||||
GOMP_OFFLOAD_openacc_async_construct (int device __attribute__((unused)))
|
||||
{
|
||||
CUstream stream = NULL;
|
||||
CUDA_CALL_ERET (NULL, cuStreamCreate, &stream, CU_STREAM_DEFAULT);
|
||||
|
|
Loading…
Reference in New Issue