I’d prefer using tvm::Device
over directly using DLDevice
. DLDevice
is not very intuitive for people programming in the TVM repo.
How about we do a new round of poll given the new options. Everyone please share your thoughts
A0
- Use DLDevice in C API
- Introduce tvm::runtime::Device in C++, alias of DLDevice for now, might add member functions(like runtime::DataType’s relation to DLDataType) later
- Introduce tvm.runtime.Device on the python side
Consistency in API with tf.Device
and torch.Device
. Keep path for future C++ class that has more functionalities(with the same ABI)
A1
- Directly DLDevice in C/C++/python API
Less aliasing. Require future update path for introducing Device class if needed.
I vote for A0 for consistency with DLDataType / tvm::DataType
Vote for A0 +1 to make it more modulized.
I vote for A0 after careful consideration. DLDevice requires extra knowledge of DLPack
I think I originally proposed A1 but one thing is that we have the TVM extension device types, so perhaps keeping a separate Device is better. I’m ok w/ A0.
Since everyone agree on A0, I’ll go ahead and prepare the PR in next week.
PR is ready for review now.