Skip to content

Conversation

@lmoneta
Copy link
Member

@lmoneta lmoneta commented Nov 14, 2025

This Pull request provides support for optimal memory allocation of dynamic tensor.
A function to compute the total size and the optimal offset for each tensor given the dynamic input parameters (e.g. batch_size, number of input features, etc..) is added in SOFIE_Common.

Add missing support for Dynamic tensors for some operators.
With this commit a full support for dynamic tensor is available for ParticleNet model.
Fix also a bug in Concat operator when the concat axis is not the first one
Since we use now for boolean tensors a std::vector<uint8_t> it is not needed to
have a special treatment when the output ttype of the operator is a boolean
(e.g. in Comparison)
…ensors

Add a new function in SOFIE_common OrganizeMemory which computes the total memory and the offset for each tensor given tensor begin /end life and size.

Fix also some small issue with dynamic tensor.
One is for the bias of Gemm and Conv. The broadcasting of bias is done for dynamic tensor in the Session constructor only if needed. For the broadcasted tensor  there is no need to create a new tensor, but the existing one is resized to the  broadcasted needed size using vector::resize
… broadcasting

The assert that was generated when broadcasting dynamic tensors was not correct
@lmoneta lmoneta requested a review from sanjibansg November 14, 2025 15:35
@lmoneta lmoneta self-assigned this Nov 14, 2025
@github-actions
Copy link

Test Results

    22 files      22 suites   3d 18h 17m 35s ⏱️
 3 779 tests  3 769 ✅  2 💤  8 ❌
81 179 runs  81 054 ✅ 30 💤 95 ❌

For more details on these failures, see this check.

Results for commit 21f3675.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant