Skip to content

feat: add utility functions and update ce version#8

Draft
pantShrey wants to merge 26 commits into
armanbilge:mainfrom
pantShrey:Adding_utils
Draft

feat: add utility functions and update ce version#8
pantShrey wants to merge 26 commits into
armanbilge:mainfrom
pantShrey:Adding_utils

Conversation

@pantShrey

Copy link
Copy Markdown
Collaborator

What

Adds InterpreterUtils and ModelLoader utility objects to simplify working with the inference runtime, and bumps the CE version.

How

InterpreterUtils

  • createBuffer / createInputBuffers: allocates zero-filled input buffers matching a model's graph input shapes and data types
  • inferenceSessionResource: wraps Interpreter.execute in a Resource that correctly manages the full native memory lifecycle
  • inferenceSessionPool: builds a KeyPool of inference sessions
  • copyArrayToBuffer: bounds-checked, IO-wrapped System.arraycopy

ModelLoader

  • Loads an ONNX model from the classpath as a ModelProto via IO.blocking, with proper stream cleanup and a clear error if the resource path is not found

…ately executing it added test suite for interpreter
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