System#

APIs to query system information.

Enumerations#

cupvaError_t

Possible error codes returned by the API.

Functions#

cupvaError_t CupvaGetDriverVersion(uint32_t *const driverVersion)

Get the version of the PVA driver.

cupvaError_t CupvaGetHardwareInfo(cupvaHardwareInfo_t *const hardwareInfo)

Query the hardware information on given platform.

cupvaError_t CupvaGetLastError(char const **const errorMsg)

Get the last error code and error message.

cupvaError_t CupvaGetRuntimeVersion(uint32_t *const runtimeVersion)

Get the version of the CUPVA runtime library.

Data Structures#

cupvaHardwareInfo_t

Holds the PVA hardware information.

Enumerations#

enum cupvaError_t#

Possible error codes returned by the API.

Values:

enumerator CUPVA_ERROR_NONE#

Starting Error code for none of the below state

enumerator CUPVA_UNSUPPORTED_FEATURE#

Error code for Unsupported Feature

enumerator CUPVA_INTERNAL_ERROR#

Error code for Internal Error

enumerator CUPVA_INVALID_STATE#

Error code for Invalid State

enumerator CUPVA_INVALID_ARGUMENT#

Error code for Invalid Argument

enumerator CUPVA_UNINITIALIZED_OBJECT#

Error code for Un-initialized Object

enumerator CUPVA_DRIVER_API_ERROR#

Error code for Driver API Error

enumerator CUPVA_COMMAND_EXECUTION_TIMEOUT#

Error code for Command Execution Timeout

enumerator CUPVA_COMMAND_SUBMISSION_TIMEOUT#

Error code for Command Submission Timeout

enumerator CUPVA_ENGINE_IN_BAD_STATE#

Error code for Engine In Bad State

enumerator CUPVA_FENCE_STATUS_BUFFER_FAILURE#

Error code for Fence Status Buffer Failure

enumerator CUPVA_VPU_APPLICATION_ERROR#

Error code for Vpu Application Error

enumerator CUPVA_VPU_DIVIDE_BY_ZERO#

Error code for Vpu Divide By Zero

enumerator CUPVA_VPU_FLOATING_POINT_NAN#

Error code for Vpu Floating Point Not A Number

enumerator CUPVA_VPU_ILLEGAL_INSTRUCTION#

Error code for Vpu Illegal Instruction

enumerator CUPVA_VPU_HALTED#

Error code for Vpu Halted

enumerator CUPVA_VPU_DEBUG_NOT_ALLOWED#

Error code for Vpu Debug Not Allowed

enumerator CUPVA_VPU_ABORTED#

Error code for Vpu Aborted

enumerator CUPVA_OPERATION_PENDING#

Error code for Operation Pending

enumerator CUPVA_INCOMPATIBLE_VERSION#

Error code indicating a version mismatch between application code and the current version of CUPVA host runtime

enumerator CUPVA_CUDA_DISABLED#

Error code indicating that CUDA has been disabled process-wide, so the attempted API call is illegal

enumerator CUPVA_INSUFFICIENT_DRIVER_VERSION#

Error code indicating that older PVA driver Version is being used

enumerator CUPVA_DLUT_ERROR#

Error code indicating that an error occurred in DLUT

enumerator CUPVA_DMA_VALIDATION_FAILED#

Error code indicating that an error occurred in DMA validation - usually DMA access out of bounds

enumerator CUPVA_PARAMETER_VALIDATION_FAILED#

Error code indicating that parameter validation failed - payload too small, invalid symbol type, etc.

enumerator CUPVA_UNKNOWN_ERROR#

Error code indicating that an unknown error occurred

enumerator CUPVA_PSFD_CHECK_MISMATCH#

Error code for PFSD CRC mismatch

enumerator CUPVA_PSFD_TIMEOUT#

Error code for PFSD Task Execution Timeout

enumerator CUPVA_NOT_ALLOWED_IN_OPERATIONAL_STATE#

Error code for calling Init/DeInit API when NVIDIA DRIVE OS VM state is “Operational”

enumerator CUPVA_ABORTED_CMD_BUFFER#

Error code indicating that the command was submitted to the PVA as part of a group of commands that was aborted due to the failure of another command in the group. This command may or may not have been aborted depending on when the failure occurred. The command that caused the abort will not get this status but instead will get a status indicating why it failed.

enumerator CUPVA_ERROR_TYPE_MAX#

One greater than max valid value

Functions#

cupvaError_t CupvaGetDriverVersion(uint32_t *const driverVersion)#

Get the version of the PVA driver.

A PVA application and the cuPVA runtime may be deployed on multiple different platform versions. Each BSP version is packaged with a PVA driver, which is versioned based on its compatibility with cuPVA runtime versions. The driver version is represented as an integer defined as (VERSION_MAJOR * 1000 + VERSION_MINOR). If the driver version is greater than or equal to the runtime version while remaining within the same major release, this means that all features of the runtime are fully supported. If the driver version is less than the runtime version, then some APIs may not be available. Refer to individual API documentation for further information.

For example, if the cuPVA runtime version is 2.5, and CupvaGetDriverVersion returns 2005 or 2006, it is guaranteed that the platform fully supports the cuPVA runtime version. If the cuPVA runtime version is 2.6, and CupvaGetDriverVersion returns 2005, some features of the runtime may not be available on that platform.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: Yes

    • De-Init: No

Parameters:

driverVersion[out] integer which will hold the driver version on successful API call

Returns:

the error code of last CUPVA API call.

cupvaError_t CupvaGetHardwareInfo(
cupvaHardwareInfo_t *const hardwareInfo,
)#

Query the hardware information on given platform.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Parameters:

hardwareInfo[in] The pointer to cupvaHardwareInfo_t object.

Returns:

cupvaError_t The completion status of the operation. Possible values are:

  • CUPVA_ERROR_NONE if the operation was successful.

  • CUPVA_INVALID_ARGUMENT if hardwareInfo was a NULL pointer.

  • CUPVA_DRIVER_API_ERROR The PVA driver returned an unexpected error.

  • CUPVA_INTERNAL_ERROR A system library returned an unexpected error.

  • CUPVA_UNSUPPORTED_FEATURE The platform does not support PVA hardware.

cupvaError_t CupvaGetLastError(char const **const errorMsg)#

Get the last error code and error message.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:

errorMsg[out] a char double pointer to return the last error messages.

Returns:

the error code of last CUPVA API call.

cupvaError_t CupvaGetRuntimeVersion(uint32_t *const runtimeVersion)#

Get the version of the CUPVA runtime library.

This API will always return the current maj.min version of the CUPVA runtime library, represented as MAJOR * 1000 + MINOR. For example, with CUPVA 2.5.3 this API would return 2005.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: Yes

    • De-Init: No

Parameters:

runtimeVersion[out] integer which will hold the driver version on successful API call

Returns:

the error code of last CUPVA API call.