[code-reflection] RFR: Add tensor factories that accept an external arena
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Mar 4 11:20:53 UTC 2025
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.
-------------
Commit messages:
- Initial push
Changes: https://git.openjdk.org/babylon/pull/335/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=335&range=00
Stats: 21 lines in 2 files changed: 15 ins; 2 del; 4 mod
Patch: https://git.openjdk.org/babylon/pull/335.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/335/head:pull/335
PR: https://git.openjdk.org/babylon/pull/335
More information about the babylon-dev
mailing list