Skip to content

[tmva][sofie] Add support for the ONNX ArgMax operator - #23830

Merged
guitargeek merged 1 commit into
root-project:masterfrom
SirAlper:sofie-argmax
Oct 26, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
SirAlper:sofie-argmax

Conversation

@SirAlper

Copy link
Copy Markdown
Contributor

This Pull request:

Adds support for the ONNX ArgMax operator in SOFIE.

Changes or fixes:

  • New ROperator_ArgMax: supports the axis (negative values included), keepdims and select_last_index attributes. Shapes are handled as Dim, so parametric dimensions also work.
  • The output tensor is registered as INT64, as required by the ONNX specification, regardless of the input type.
  • New ParseArgMax parser, registered in RModelParser_ONNX.
  • Three new tests in TestCustomModelsFromONNX (default attributes; axis=1, keepdims=0; axis=-1, select_last_index=1 with ties). Expected values were cross-checked with onnxruntime.
  • Added ArgMax to the supported operators list in the SOFIE README.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

Implement ROperator_ArgMax and its ONNX parser, supporting the axis (including negative values), keepdims and select_last_index attributes. The output is always INT64. Add three tests covering the default attributes, keepdims=0 and select_last_index=1 with ties.
@github-actions

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 20h 19m 36s ⏱️
 3 896 tests  3 896 ✅ 0 💤 0 ❌
83 416 runs  83 416 ✅ 0 💤 0 ❌

Results for commit 42f3d8c.

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you

@guitargeek
guitargeek merged commit 0c5ac28 into root-project:master Oct 26, 2026
36 checks passed
@SirAlper
SirAlper deleted the sofie-argmax branch October 26, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants