CUDA Fortran Equivalent to nvcc --default-stream per-thread

OpenACC and CUDA Fortran
Post Reply
Loregard
Posts: 1
Joined: May 08 2018

CUDA Fortran Equivalent to nvcc --default-stream per-thread

Post by Loregard » Wed Sep 18, 2019 2:20 pm

Hi,

I'm trying to replicate the results shown here in Fortran 90.

However, I haven't found an option equivalent to "--default-stream per-thread" for the PGF90 compiler.

Does anyone have any ideas on how i can get the default stream per thread behavior, and the non-blocking default stream? Thanks.

mkcolg
Posts: 8067
Joined: Jun 30 2004

Re: CUDA Fortran Equivalent to nvcc --default-stream per-thread

Post by mkcolg » Thu Sep 19, 2019 7:51 am

Hi Loregard,

No, sorry. CUDA Fortran does not have an equivalent flag. There is an API Call you can use, "cudaSetStreamDefault" to change the default stream, but this is not on a per-thread basis.

See: https://www.pgroup.com/resources/docs/1 ... eamdefault

Note that for OpenMP programming (which would be the most equivalent method to Mark's pthread example), each OpenMP thread does use different default streams by default.

-Mat

Post Reply