Skip to content

[tmva][sofie] Fix NonZero to define max output shape value in the Session constructor#21458

Merged
lmoneta merged 1 commit intoroot-project:masterfrom
lmoneta:tmva_sofie_fix_nonzero
Mar 3, 2026
Merged

[tmva][sofie] Fix NonZero to define max output shape value in the Session constructor#21458
lmoneta merged 1 commit intoroot-project:masterfrom
lmoneta:tmva_sofie_fix_nonzero

Conversation

@lmoneta
Copy link
Member

@lmoneta lmoneta commented Mar 3, 2026

The maximum value of the output shape (the number of non zero elements) does not need to be defined as Session data member but can be defined in the Session constructor. This requires adding a new function in ROperator, GenerateSessionCtorCode to add the code defining the max value. We cannot use GenerateInitCode, because this is used for code that is executed after having allocated the dynamic tensors.

This Pull request replaces #21452

@lmoneta lmoneta self-assigned this Mar 3, 2026
@lmoneta lmoneta changed the title [tmva][sofie] Fix NonZero to define max output shape values in Session actor [tmva][sofie] Fix NonZero to define max output shape value in the Session constructor Mar 3, 2026
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

Thank you very much! Works for me 👍

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Test Results

    22 files      22 suites   3d 4h 34m 44s ⏱️
 3 805 tests  3 799 ✅  1 💤 5 ❌
75 684 runs  75 669 ✅ 10 💤 5 ❌

For more details on these failures, see this check.

Results for commit 0759a34.

…n ctor

The maximum value of the output shape (the number of non zero elements) does not need to be defined as Session data member but can be defined in the Session constructor.
This requires adding a new function in ROperator, GenerateSessionCtorCode to add the code defining the max value. We cannot use GenerateInitCode, because this is used for code that is executed after having allocated the dynamic tensors.
@lmoneta lmoneta force-pushed the tmva_sofie_fix_nonzero branch from 0759a34 to 16660b2 Compare March 3, 2026 12:15
@lmoneta lmoneta merged commit 1f747b0 into root-project:master Mar 3, 2026
13 of 29 checks passed
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