Open huningxin opened 3 years ago
It's an interesting suggestion! I believe the original intent with HelloDirectML was to write the shortest possible code sample, without any superfluous code, that does a step-by-step walk-through of the stages of initializing and executing a single operator. I personally agree that this sample could be cleaned up a bit, though it's tricky to introduce abstractions here without muddying key concepts like binding, operator initialization, and operator dispatching. The style of abstractions that work best really depend on the application.
The device wrapper of Python samples is a quite good helper for DirectML device and resource management. I propose to make it also useful for C++ sample, e.g. HelloDirectML . That would simplify the C++ sample and improve the code reuse.
Any thoughts?