[code-reflection] RFR: ONNX FFM Runtime initial work [v3]

Adam Sotona asotona at openjdk.org
Mon Feb 10 15:17:25 UTC 2025


On Sun, 9 Feb 2025 14:31:14 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> This is initial work on ONNX FFM runtime with very raw connection with OnnxInterpreter and Tensor.
>> 
>> It is a rebase of https://github.com/PaulSandoz/babylon/pull/1
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
> 
>   minor rename

In order to use the code generated by `jextract` you need to know exactly how `jextract` works. There are thousands of methods like:

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3, MemorySegment _x4) {

and I have no idea how they are related to the original struct and what are the parameters. 
I gave it a try with the original header file open on one monitor and the generated code on the other and I was not able to find any entry point and had no idea how to compose the invoke calls.

I'm sorry but this generated code may be helpful only when you exactly know how `jextract` works.

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

PR Comment: https://git.openjdk.org/babylon/pull/311#issuecomment-2648331610


More information about the babylon-dev mailing list