[code-reflection] RFR: Add tensor factories that accept an external arena

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Mar 4 13:59:09 UTC 2025


On Tue, 4 Mar 2025 11:16:03 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR adds three overloaded `Tensor::ofShape` factories which take an external arena. The existing factories have been rewired to call the new ones with a new automatic arena.
> 
> This allows us to make a small improvement in the MNISTDemo, where we can now allocate a tensor whose lifetime is managed by the arena that is also used to manage the lifetime of all the resources created within onnx session.

Closing as this work is included here: https://github.com/openjdk/babylon/pull/337

-------------

PR Comment: https://git.openjdk.org/babylon/pull/335#issuecomment-2697694257


More information about the babylon-dev mailing list