ForceDisableSupport#

Fully qualified name: cupva::cuda::ForceDisableSupport

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

void cupva::cuda::ForceDisableSupport()#

Disable CUDA interop support.

Used to disable CUDA on a process-wide basis.

During creation of the first cupva::Context for a process, the CUDA driver library will be loaded.

In certain safety applications, it is desirable for the process to be fully isolated from any dependencies on CUDA. Calling this API will ensure that future calls which require CUDA will fail before loading the CUDA driver or performing any CUDA API calls.

This API will fail with an exception if the process has previously made calls which required the CUDA driver to be loaded. Failure is atomic - if this API succeeds, than user is guaranteed that this process has never, and will never, make successful CUDA interop calls.

To ensure that the calling process has no dependency on CUDA, this API should be called prior to any other CUPVA APIs.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Throws:

cupva::Exception(InvalidState) – If this process has previously called CUDA interop APIs