SetAffinity#

Fully qualified name: cupva::cuda::SetAffinity

Defined in src/host/cpp_api/include/cupva_host_cuda.hpp

void cupva::cuda::SetAffinity(
cudaStream_t const cudaStream,
AffinityType const vpuAffinity,
)#

Set the VPU affinity for a CUDA stream.

By default, submissions to CUDA streams will permitted for scheduling on any VPU. This function can be used to change this behavior by setting the VPU affinity on a per-stream basis.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:
  • cudaStream[in] The CUDA stream handle.

  • vpuAffinity[in] The VPU affinity to set for the stream.

Throws: