-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ONNX Integration #32
Comments
It may be helpful to check out burn-import. I'm pretty familiar with it after I did a major refactor a month or so ago. Essentially the process is this:
Everything (at least last I worked on it) happens at compile time. There is some runtime stuff that onnx supports that can't really happen at this moment, like runtime inference of the dimensions of an output tensor, though I can't say whether that would be the case for luminal. It would be awesome if there could be some generalized solution for Onnx support that is independent of any specific library. That being said, I can answer questions and help out in a limited capacity, but I'm also a bit bandwidth constrained at the moment, and likely will be for some time. Maybe in a month or two if no one else picks it up. |
Will do, thanks for the writeup! I'm thinking this will be pretty tightly integrated with converting onnx graphs to luminal primgraphs, but I can definitely see after the initial version is working, spinning out the luminal-independant bits into a new crate. We can also handle runtime inferred dimensions through the dynamic dimensions supported in luminal graphs. |
ONNX graphs should be able to be converted to luminal primgraphs. Only tricky part is getting GraphTensors out once the graph is converted, for inputting data and getting output.
This can probably just be implemented in a seperate crate
luminal_onnx
with a single functiononnx_graph(file_name) -> Graph
or something. Once the primgraph has been created from the onnx file, normal luminal compilers can be ran on it.Currently I'm bandwidth constrained so if someone wants to pick this up, it's fairly isolated from the rest of the codebase so should be a decent first issue.
The text was updated successfully, but these errors were encountered: