[onert/train] all of backend contexts are candidates when `TrainableExecutor` is created
When TrainableExecutor is created, all of backend contexts are candidates.
In ExecutorFactory::createTrainableExecutor,
https://github.com/Samsung/ONE/blob/890b72859b19af9c29488f88fc2e927a75f35c77/runtime/onert/core/src/compiler/ExecutorFactory.cc#L673-L681
The only candidate should be train backend context.
/cc @Samsung/one_onert
I agree with you on this point. The TrainableExecutor must have a train backend context. However, I don't know it is enough to train the model using only the train backend context.
It seems necessary to restrict TrainableExecutor to include Train backend.
Maybe for partial training? @ragmani
(Anyway, my problem was resolved.)
@YongseopKim
- The
TrainableExecutorhave two backends (trainbackend andbuiltinbackend) now, soTrainableBackendContextsis necessary even if the only candidate should betrainbackend. - All of backend contexts cannot be candidates, all of trainable backends(
backend::train::ITrainableBackend) can be candidates. - There is also code to check non-trainable backends although it looks temporary code. https://github.com/Samsung/ONE/blob/7be192529936563e0910ae903f43a9eb97fc9214/runtime/onert/core/src/compiler/ExecutorFactory.cc#L726-L733