diff options
author | Xusong Wang <xusongw@google.com> | 2018-11-05 09:59:30 -0800 |
---|---|---|
committer | Xusong Wang <xusongw@google.com> | 2018-12-11 17:31:32 -0800 |
commit | 2ebf64c33499db5fbc04d5e93ea35d70d64e44e7 (patch) | |
tree | 0d0b6a3ee1e5fe138ffebe70c793afbcdb5b10e5 /nn/runtime/ExecutionPlan.h | |
parent | aea2532e1f17fb6bea789b6dc8e707f39f043f53 (diff) | |
download | ml-2ebf64c33499db5fbc04d5e93ea35d70d64e44e7.tar.gz |
Add versioned interface for 1.2 HAL changes.
Add versioned interface for IPreparedModel. Support 1.2 callbacks.
Implement 1.2 HAL interface in sample driver.
Bug: 73506513
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I1bc7aed424ebf3fd9635b1e411ee41a853d5bc9b
Diffstat (limited to 'nn/runtime/ExecutionPlan.h')
-rw-r--r-- | nn/runtime/ExecutionPlan.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nn/runtime/ExecutionPlan.h b/nn/runtime/ExecutionPlan.h index a2d018c0e..518ec2925 100644 --- a/nn/runtime/ExecutionPlan.h +++ b/nn/runtime/ExecutionPlan.h @@ -24,6 +24,7 @@ #include "ModelBuilder.h" #include "NeuralNetworks.h" #include "Utils.h" +#include "VersionedInterfaces.h" #include <set> @@ -87,7 +88,9 @@ public: std::shared_ptr<Device> getDevice() const { return mDevice; } // only available after calling finishSubModel() - sp<IPreparedModel> getPreparedSubModel() const { return mPreparedSubModel; } + std::shared_ptr<VersionedIPreparedModel> getPreparedSubModel() const { + return mPreparedSubModel; + } // Map inputs and outputs from ExecutionBuilder to StepExecutor. void mapInputsAndOutputs(std::shared_ptr<StepExecutor> stepExecutor) const; @@ -105,7 +108,7 @@ private: uint32_t mIndex; // index of step within plan ModelBuilder mSubModel; std::shared_ptr<Device> mDevice; // nullptr signifies CPU - sp<IPreparedModel> mPreparedSubModel; // not used for CPU + std::shared_ptr<VersionedIPreparedModel> mPreparedSubModel; // not used for CPU // Inputs of original model that are also inputs of this submodel: // (fromModel index, subModel index) @@ -243,7 +246,7 @@ private: std::shared_ptr<Device> mDevice; // nullptr signifies CPU const ModelBuilder* mModel; - sp<IPreparedModel> mPreparedModel; // not used for CPU + std::shared_ptr<VersionedIPreparedModel> mPreparedModel; // not used for CPU }; struct CompoundBody : Body { |