schell commented on a change in pull request #8665:
URL: https://github.com/apache/tvm/pull/8665#discussion_r683809576
##########
File path: rust/tvm-rt/Cargo.toml
##########
@@ -33,7 +33,55 @@ default = ["dynamic-linking"]
dynamic-linking = ["tvm-sys/dynamic-linking"]
static-linking = ["tvm-sys/static-linking"]
standalone = ["tvm-sys/runtime-only"]
+runtime-only = ["tvm-sys/runtime-only"]
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"]
Review comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]