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

            Bug ID: 91917
           Summary: OpenACC 'acc_set_cuda_stream' return type
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

OpenACC 2.7, A.2.1. "NVIDIA CUDA Platform" currently specifies:

    'acc_set_cuda_stream'
    Summary The 'acc_set_cuda_stream' routine sets the NVIDIA CUDA stream
handle [of] the
    current device for the specified async value.
    Format
    C or C++:
        int acc_set_cuda_stream ( int async, void* stream );

Note that this is specified to return an 'int' but doesn't specify what these
'int' values would mean.  (And indeed there is no sensible information to be
returned from this function.)

The above matches our declaration in <openacc.h>.  The PGI implementation on
the other hand has always provided this function with a 'void' return type
instead of 'int'.

The suggestion is now to adjust the OpenACC specification to match that: 'void'
return type.  (I conceptually agree.)

Jakub, will it be OK to just change GCC's <openacc.h> declaration and
implementation accordingly (given that it hasn't been specified, no user can
have any expectations about the 'int' value returned), or are the ABI concerns
(which can be resolved by introducing a new symbol version?), or even any other
concerns?

Reply via email to