Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Heuristic:NVIDIA DALI Warning Deprecated C API V1 Functions

From Leeroopedia
Revision as of 10:55, 16 February 2026 by Admin (talk | contribs) (Auto-imported from heuristics/NVIDIA_DALI_Warning_Deprecated_C_API_V1_Functions.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



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.
  • Deprecated Function: daliPrefetchSeparate
    • Replacement: daliPrefetch
    • Reason: Same as above.
  • Deprecated Function: daliCopyTensorNTo
    • Replacement: daliOutputCopy
    • Reason: Unified output copy interface.
  • Deprecated Function: daliCopyTensorListNTo
    • Replacement: daliOutputCopy
    • Reason: Same as above.
  • General Guidance: For new C/C++ integrations, prefer C API v2 (dali/dali.h) which provides improved error handling via daliResult_t return 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.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment