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:Onnx Onnx Warning Deprecated InlineSelectedFunctions

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



Knowledge Sources
Domains Function_Inlining, API_Deprecation
Last Updated 2026-02-10 00:00 GMT

Overview

Deprecation warning: the two-parameter overload of InlineSelectedFunctions is deprecated in favor of InlineSelectedLocalFunctions.

Description

The two-parameter overload of InlineSelectedFunctions(ModelProto&, const FunctionIdSet&) in onnx/inliner/inliner.h is marked with @deprecated in the source code. It was retained for backward compatibility but should not be used in new code. The deprecation exists to avoid confusion with the three-parameter overload of InlineSelectedFunctions that inlines schema-defined functions as well.

Usage

Apply this warning when reviewing or writing code that calls InlineSelectedFunctions with only two parameters (model and function id set). Replace such calls with InlineSelectedLocalFunctions, which has identical behavior but a clearer name.

The Insight (Rule of Thumb)

  • Action: Replace all calls to the two-parameter InlineSelectedFunctions(model, to_inline) with InlineSelectedLocalFunctions(model, to_inline).
  • Value: Direct function rename; no parameter changes needed.
  • Trade-off: None. The functions are functionally identical.

Reasoning

The ONNX team deprecated the two-parameter overload because having two overloads of InlineSelectedFunctions with different semantics (one for model-local functions, one for schema-defined functions) was confusing. The rename to InlineSelectedLocalFunctions makes the scope of inlining explicit in the function name.

Related Pages

Page Connections

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