KernelContext_GetGPUComputeStream property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtKernelContext> context, Pointer<Pointer<Void>> out)>> KernelContext_GetGPUComputeStream
getter/setter pair

\brief Used for custom operators, gets the GPU compute stream to use to launch the custom a GPU kernel \see ::OrtCustomOp \paramin context OrtKernelContext instance \paramout out Returns pointer to a GPU compute stream that can be used to launch the custom GPU kernel. If retrieving the GPU compute stream is not relevant (GPU not enabled in the build, kernel partitioned to some other EP), then a nullptr is returned as the output param. Do not free or mutate the returned pointer as it refers to internal data owned by the underlying session. Only use it for custom kernel launching.

\snippet{doc} snippets.dox OrtStatus Return Value

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtKernelContext> context,
      ffi.Pointer<ffi.Pointer<ffi.Void>> out,
    )
  >
>
KernelContext_GetGPUComputeStream;