NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
CUPVA_Host_System_C

Detailed Description

Data Structures

struct  cupvaHardwareInfo_t
 Holds the PVA hardware information. More...
 

Enumerations

enum  cupvaError_t {
  CUPVA_ERROR_NONE = 0,
  CUPVA_UNSUPPORTED_FEATURE,
  CUPVA_INTERNAL_ERROR,
  CUPVA_INVALID_STATE,
  CUPVA_INVALID_ARGUMENT,
  CUPVA_UNINITIALIZED_OBJECT,
  CUPVA_DRIVER_API_ERROR,
  CUPVA_COMMAND_EXECUTION_TIMEOUT,
  CUPVA_COMMAND_SUBMISSION_TIMEOUT,
  CUPVA_ENGINE_IN_BAD_STATE,
  CUPVA_FENCE_STATUS_BUFFER_FAILURE,
  CUPVA_VPU_APPLICATION_ERROR,
  CUPVA_VPU_DIVIDE_BY_ZERO,
  CUPVA_VPU_FLOATING_POINT_NAN,
  CUPVA_VPU_ILLEGAL_INSTRUCTION,
  CUPVA_VPU_HALTED,
  CUPVA_VPU_DEBUG_NOT_ALLOWED,
  CUPVA_VPU_ABORTED,
  CUPVA_OPERATION_PENDING,
  CUPVA_VPU_BUFFER_OVERFLOW,
  CUPVA_PSFD_CHECK_MISMATCH = 0x00010000,
  CUPVA_PSFD_TIMEOUT,
  CUPVA_NOT_ALLOWED_IN_OPERATIONAL_STATE,
  CUPVA_INCOMPATIBLE_VERSION,
  CUPVA_CUDA_DISABLED,
  CUPVA_INSUFFICIENT_DRIVER_VERSION,
  CUPVA_ERROR_TYPE_MAX
}
 Possible error codes returned by the API. More...
 

Functions

DLL_EXPORT cupvaError_t CupvaGetHardwareInfo (cupvaHardwareInfo_t *const hardwareInfo)
 Query the hardware information on given platform. More...
 
DLL_EXPORT cupvaError_t CupvaGetLastError (char const **const errorMsg)
 Get the last error code and error message. More...
 
DLL_EXPORT cupvaError_t CupvaGetDriverVersion (uint32_t *driverVersion)
 Get the version of the PVA driver. More...
 
DLL_EXPORT cupvaError_t CupvaGetRuntimeVersion (uint32_t *runtimeVersion)
 Get the version of the CUPVA runtime library. More...
 

Enumeration Type Documentation

◆ cupvaError_t

Possible error codes returned by the API.

Enumerator
CUPVA_ERROR_NONE 

Starting Error code for none of the below state.

CUPVA_UNSUPPORTED_FEATURE 

Error code for Unsupported Feature.

CUPVA_INTERNAL_ERROR 

Error code for Internal Error.

CUPVA_INVALID_STATE 

Error code for Invalid State.

CUPVA_INVALID_ARGUMENT 

Error code for Invalid Argument.

CUPVA_UNINITIALIZED_OBJECT 

Error code for Un-initialized Object.

CUPVA_DRIVER_API_ERROR 

Error code for Driver API Error.

CUPVA_COMMAND_EXECUTION_TIMEOUT 

Error code for Command Execution Timeout.

CUPVA_COMMAND_SUBMISSION_TIMEOUT 

Error code for Command Submission Timeout.

CUPVA_ENGINE_IN_BAD_STATE 

Error code for Engine In Bad State.

CUPVA_FENCE_STATUS_BUFFER_FAILURE 

Error code for Fence Status Buffer Failure.

CUPVA_VPU_APPLICATION_ERROR 

Error code for Vpu Application Error.

CUPVA_VPU_DIVIDE_BY_ZERO 

Error code for Vpu Divide By Zero.

CUPVA_VPU_FLOATING_POINT_NAN 

Error code for Vpu Floating Point Not A Number.

CUPVA_VPU_ILLEGAL_INSTRUCTION 

Error code for Vpu Illegal Instruction.

CUPVA_VPU_HALTED 

Error code for Vpu Halted.

CUPVA_VPU_DEBUG_NOT_ALLOWED 

Error code for Vpu Debug Not Allowed.

CUPVA_VPU_ABORTED 

Error code for Vpu Aborted.

CUPVA_OPERATION_PENDING 

Error code for Operation Pending.

CUPVA_VPU_BUFFER_OVERFLOW 

Error code for Insufficient Memory.

CUPVA_PSFD_CHECK_MISMATCH 

Error code for PFSD CRC mismatch.

CUPVA_PSFD_TIMEOUT 

Error code for PFSD Task Execution Timeout.

CUPVA_NOT_ALLOWED_IN_OPERATIONAL_STATE 

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

CUPVA_INCOMPATIBLE_VERSION 

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

CUPVA_CUDA_DISABLED 

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

CUPVA_INSUFFICIENT_DRIVER_VERSION 

Error code indicating that older PVA driver Version is being used.

CUPVA_ERROR_TYPE_MAX 

One greater than max valid value.

Definition at line 28 of file cupva_host_types_detail.h.

Function Documentation

◆ CupvaGetDriverVersion()

DLL_EXPORT cupvaError_t CupvaGetDriverVersion ( uint32_t *  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.

Parameters
[out]driverVersioninteger which will hold the driver version on successful API call
Returns
the error code of last CUPVA API call.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: Yes
    • Runtime: Yes
    • De-Init: No

◆ CupvaGetHardwareInfo()

DLL_EXPORT cupvaError_t CupvaGetHardwareInfo ( cupvaHardwareInfo_t *const  hardwareInfo)

Query the hardware information on given platform.

Parameters
[in]hardwareInfoThe 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.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ CupvaGetLastError()

DLL_EXPORT cupvaError_t CupvaGetLastError ( char const **const  errorMsg)

Get the last error code and error message.

Parameters
[out]errorMsga char double pointer to return the last error messages.
Returns
the error code of last CUPVA API call.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ CupvaGetRuntimeVersion()

DLL_EXPORT cupvaError_t CupvaGetRuntimeVersion ( uint32_t *  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.

Parameters
[out]runtimeVersioninteger which will hold the driver version on successful API call
Returns
the error code of last CUPVA API call.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: Yes
    • Runtime: Yes
    • De-Init: No