From: Tom de Vries <tdevries@suse.de>
To: cltang@codesourcery.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes
Date: Fri, 05 Oct 2018 14:07:00 -0000 [thread overview]
Message-ID: <47ee4d62-94a0-91c4-8975-88b80bb51827@suse.de> (raw)
In-Reply-To: <9523b49a-0454-e0a9-826d-5eeec2a8c973@mentor.com>
On 9/25/18 3:11 PM, Chung-Lin Tang wrote:
> Hi Tom,
> this patch removes large portions of plugin/plugin-nvptx.c, since a lot
> of it is
> now in oacc-async.c now.
Yay!
> The new code is essentially a
> NVPTX/CUDA-specific implementation
> of the new-style goacc_asyncqueues.
>
> Also, some needed functions in cuda-lib.def are added. The cuda.h
> function has also
> been updated to build independently without a CUDA installation.
>
I see these formatting issues:
...
$ check_GNU_style.sh async-06.nvptx.patch
There should be exactly one space between function name and parenthesis.
35:+CUresult cuStreamAddCallback(CUstream, CUstreamCallback, void *,
unsigned int);
Trailing operator.
1320:+ struct nvptx_thread *nvthd =
...
Otherwise, OK.
Thanks,
- Tom
> Thanks,
> Chung-Lin
>
> Â Â Â Â * plugin/plugin-nvptx.c (struct cuda_map): Remove.
> Â Â Â Â (struct ptx_stream): Remove.
> Â Â Â Â (struct nvptx_thread): Remove current_stream field.
> Â Â Â Â (cuda_map_create): Remove.
> Â Â Â Â (cuda_map_destroy): Remove.
> Â Â Â Â (map_init): Remove.
> Â Â Â Â (map_fini): Remove.
> Â Â Â Â (map_pop): Remove.
> Â Â Â Â (map_push): Remove.
> Â Â Â Â (struct goacc_asyncqueue): Define.
> Â Â Â Â (struct nvptx_callback): Define.
> Â Â Â Â (struct ptx_free_block): Define.
> Â Â Â Â (struct ptx_device): Remove null_stream, active_streams, async_streams,
> Â Â Â Â stream_lock, and next fields.
> Â Â Â Â (enum ptx_event_type): Remove.
> Â Â Â Â (struct ptx_event): Remove.
> Â Â Â Â (ptx_event_lock): Remove.
> Â Â Â Â (ptx_events): Remove.
> Â Â Â Â (init_streams_for_device): Remove.
> Â Â Â Â (fini_streams_for_device): Remove.
> Â Â Â Â (select_stream_for_async): Remove.
> Â Â Â Â (nvptx_init): Remove ptx_events and ptx_event_lock references.
> Â Â Â Â (nvptx_attach_host_thread_to_device): Remove CUDA_ERROR_NOT_PERMITTED
> Â Â Â Â case.
> Â Â Â Â (nvptx_open_device): Add free_blocks initialization, remove
> Â Â Â Â init_streams_for_device call.
> Â Â Â Â (nvptx_close_device): Remove fini_streams_for_device call, add
> Â Â Â Â free_blocks destruct code.
> Â Â Â Â (event_gc): Remove.
> Â Â Â Â (event_add): Remove.
> Â Â Â Â (nvptx_exec): Adjust parameters and code.
> Â Â Â Â (nvptx_free): Likewise.
> Â Â Â Â (nvptx_host2dev): Remove.
> Â Â Â Â (nvptx_dev2host): Remove.
> Â Â Â Â (nvptx_set_async): Remove.
> Â Â Â Â (nvptx_async_test): Remove.
> Â Â Â Â (nvptx_async_test_all): Remove.
> Â Â Â Â (nvptx_wait): Remove.
> Â Â Â Â (nvptx_wait_async): Remove.
> Â Â Â Â (nvptx_wait_all): Remove.
> Â Â Â Â (nvptx_wait_all_async): Remove.
> Â Â Â Â (nvptx_get_cuda_stream): Remove.
> Â Â Â Â (nvptx_set_cuda_stream): Remove.
> Â Â Â Â (GOMP_OFFLOAD_alloc): Adjust code.
> Â Â Â Â (GOMP_OFFLOAD_free): Likewise.
> Â Â Â Â (GOMP_OFFLOAD_openacc_register_async_cleanup): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_exec): Adjust parameters and code.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_test_all): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_wait): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_wait_async): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_wait_all): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_wait_all_async): Remove.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_set_async): Remove.
> Â Â Â Â (cuda_free_argmem): New function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_exec): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_create_thread_data): Adjust code.
> Â Â Â Â (GOMP_OFFLOAD_openacc_cuda_get_stream): Adjust code.
> Â Â Â Â (GOMP_OFFLOAD_openacc_cuda_set_stream): Adjust code.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_construct): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_destruct): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_test): Remove and re-implement.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_synchronize): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_serialize): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_queue_callback): New plugin hook function.
> Â Â Â Â (cuda_callback_wrapper): New function.
> Â Â Â Â (cuda_memcpy_sanity_check): New function.
> Â Â Â Â (GOMP_OFFLOAD_host2dev): Remove and re-implement.
> Â Â Â Â (GOMP_OFFLOAD_dev2host): Remove and re-implement.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_host2dev): New plugin hook function.
> Â Â Â Â (GOMP_OFFLOAD_openacc_async_dev2host): New plugin hook function.
next prev parent reply other threads:[~2018-10-05 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 13:13 Chung-Lin Tang
2018-10-05 14:07 ` Tom de Vries [this message]
2018-12-06 20:57 ` Thomas Schwinge
2018-12-10 10:02 ` Chung-Lin Tang
2018-12-11 13:50 ` [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes (revised, v2) Chung-Lin Tang
2018-12-18 15:07 ` [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes (revised, v3) Chung-Lin Tang
2023-01-12 13:51 ` nvptx: Avoid deadlock in 'cuStreamAddCallback' callback, error case (was: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes) Thomas Schwinge
2023-01-13 13:17 ` Chung-Lin Tang
2023-01-13 13:59 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47ee4d62-94a0-91c4-8975-88b80bb51827@suse.de \
--to=tdevries@suse.de \
--cc=cltang@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).