-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow rust tvm build configuration through cargo features #8665
Allow rust tvm build configuration through cargo features #8665
Conversation
blas = ["ndarray/blas"] | ||
# Enabling any of the following features is like setting the value to "ON" in config.cmake. | ||
use-cuda = ["tvm-sys/use-cuda"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @schell just wondering, is it possible to auto-generate this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure it's possible but it's definitely not standard. It would be a bespoke generator for sure.
This is the defacto Rust project declaration, so I think auto-generating it would be confusing for Rust contributors in the long run. I do agree that keeping these in sync with TVM proper will be a bit error prone though - especially since it has to happen in a number of crates in this repo. Unfortunately there doesn't seem to be any way to iterate over user-set features in Rust at the moment, which was what I was hoping to do to cut down on the boiler plate here.
Ultimately this approach is explicit, which is good - I learned about the CoreML support by adding these! But it does mean that the configurable features will always lag behind TVM proper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can think about this kind of stuff in the Backlog @areusch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as first cut, feel free to follow up with more PRs.
Thank you for the fast turn-around :) 👍 |
After octoml/tvm-build#6 goes through we can update the cargo path totvm-build
and set this draft as ready to PR.Ready!