Heuristic:NVIDIA DALI Warning Deprecated C API V1 Functions
| Knowledge Sources | |
|---|---|
| Domains | C_API, Migration |
| Last Updated | 2026-02-08 18:00 GMT |
Overview
Deprecation warning for several DALI C API v1 functions that have been superseded by newer equivalents or by the C API v2.
Description
The DALI C API v1 (dali/c_api/c_api.cc) contains several functions explicitly marked as deprecated in the source code and header (include/dali/c_api.h). These deprecated functions still function but emit runtime warnings and should be replaced with their recommended alternatives. Additionally, the entire C API v1 coexists with the newer C API v2 (dali/c_api_2/), which provides an improved design with reference-counted data objects and better error handling.
Usage
Consult this heuristic when working with the DALI C API. If you encounter any of the deprecated functions listed below, migrate to the recommended alternative. For new integrations, prefer the C API v2 (dali/dali.h) over C API v1 (dali/c_api.h).
The Insight (Rule of Thumb)
- Deprecated Function:
daliPrefetchUniform- Replacement:
daliPrefetch - Reason: Unified prefetch interface replaces separate uniform/separated variants.
- Replacement:
- Deprecated Function:
daliPrefetchSeparate- Replacement:
daliPrefetch - Reason: Same as above.
- Replacement:
- Deprecated Function:
daliCopyTensorNTo- Replacement:
daliOutputCopy - Reason: Unified output copy interface.
- Replacement:
- Deprecated Function:
daliCopyTensorListNTo- Replacement:
daliOutputCopy - Reason: Same as above.
- Replacement:
- General Guidance: For new C/C++ integrations, prefer C API v2 (dali/dali.h) which provides improved error handling via
daliResult_treturn codes, reference-counted data objects, and a cleaner interface.
Reasoning
The C API v1 accumulated multiple overlapping function variants over time (e.g., daliCreatePipeline, daliCreatePipeline2, daliCreatePipeline3). The deprecated functions were superseded by unified alternatives that handle both uniform and separated execution modes. The C API v2 was introduced to address these design issues with a cleaner architecture from the start.