Host C API#
Userspace host APIs for programming PVA engine in C.
The cuPVA host C APIs are used to allocate memory, configure DataFlows, create tasks, schedule tasks, and manage interop with other engines. These APIs are accessible to code running on the host (e.g. CPU of the target device).
Host C APIs are implemented with a number of functions and types.
Some functions require allocation of memory or other resources, either in their implementation or in their underlying system calls. To make it clear which calls allocate, such functions will have “Create” in their name, For example, see CupvaSyncObjCreate(). Somes functions call in-place constructor to init an object, and don’t allocate memory or other resources, i.e. CupvaFenceInit(). Such functions have “Init” suffix in their name. For an object created with a “Create” function, user needs to call the corresponding “Destroy” function to release the memory. There is no need to do so for an object constructed with an “Init” function.
Each API group has further subdivision of init, runtime, deinit. These specify the application phase in which the API may be used in a safety critical system.
Groups#
- CUDA Interoperability
APIs for interoperability with CUDA.
- Context
APIs to create and manage cuPVA contexts.
- Dataflow configuration
APIs to configure DataFlows which have been requested from a CmdProgram.
- NvSci Interoperability
APIs for interoperability using NvSci.
- Program
APIs to create and manage CmdPrograms required for scheduling work on PVA engine.
- Resource
APIs to create and manage resources used by other cuPVA APIs.
- Stream
APIs to submit work (cupvaCmdProgram_t) and other commands to the PVA engine.
- Synchronization
APIs to synchronize the access to resources from multiple asynchronous engines.
- System
APIs to query system information.