Time taken in Inference session
This is my code:
Output:
Why creating an inference session and loading the graph into the inference session to create model taking a lot of time i.e., around 4 seconds?
Also is there a work around to reduce this time as I have to create different models for my use case.
MAX version: max 24.3.0 (9882e19d)
2 Replies
That's the time spent on compiling the graph. We'll soon exposing caching so that subsequent runs will become much faster.
I'm new and sorry for asking such basic questions.
1. I am compiling my code using mojo i.e., and then running the executable. Does this mean that the compilation of the graph using the MAX Engine compiler occurs at runtime and that optimizations on the graph are also performed during runtime?
2. During execution, does the Mojo compiler invoke the MAX Engine compiler to compile and optimize the graph?
3. I have written my entire model in Mojo. Now, I am planning to break down my model into custom operations in MAX Graph. Will this provide performance benefits since the MAX Engine compiler might further optimize my custom operations written in Mojo?