Merged
add nnrt model path #628
zheng-kunfangAdd on 6 days ago
add nnrt model path #628
Merged
Total: 6 files changed+42-5
Mmindspore-src/source/mindspore-lite/src/litert/cache_session.cc+7-4File content is under review, please try again later
Mmindspore-src/source/mindspore-lite/src/litert/cache_session.h+1-0File content is under review, please try again later
Mmindspore-src/source/mindspore-lite/src/litert/delegate/nnrt/nnrt_delegate.cc+24-1File content is under review, please try again later
| @@ -53,6 +53,9 @@ class NNRTDelegate : public Delegate { | |||
| 53 | void SetDequantTensors(std::vector<Tensor *> *src_tensors) { | 53 | void SetDequantTensors(std::vector<Tensor *> *src_tensors) { |
| 54 | dequant_src_tensors_ = src_tensors; | 54 | dequant_src_tensors_ = src_tensors; |
| 55 | } | 55 | } |
| 56 | + void SetModelPath(const std::string &modelPath) { | ||
| 57 | + model_path_ = modelPath; | ||
| 58 | + } | ||
| 56 | static std::vector<NNRTOpRange> GetNNRTSubgraphRanges(DelegateModel<schema::Primitive> *model, | 59 | static std::vector<NNRTOpRange> GetNNRTSubgraphRanges(DelegateModel<schema::Primitive> *model, |
| 57 | const std::vector<bool> &op_supports); | 60 | const std::vector<bool> &op_supports); |
| 58 | bool IsBuildOffline() const { return build_offline_; } | 61 | bool IsBuildOffline() const { return build_offline_; } |
| @@ -99,6 +102,7 @@ class NNRTDelegate : public Delegate { | |||
| 99 | #endif | 102 | #endif |
| 100 | 103 | ||
| 101 | NNRtDeviceInfo nnrt_device_info_; | 104 | NNRtDeviceInfo nnrt_device_info_; |
| 105 | + std::string model_path_; | ||
| 102 | LiteGraph *lite_graph_ = nullptr; | 106 | LiteGraph *lite_graph_ = nullptr; |
| 103 | const void *meta_graph_ = nullptr; | 107 | const void *meta_graph_ = nullptr; |
| 104 | nnrt::ExtensionOptions extension_options_; | 108 | nnrt::ExtensionOptions extension_options_; |
Mmindspore-src/source/mindspore-lite/src/litert/lite_model.h+2-0File content is under review, please try again later
Mmindspore-src/source/mindspore-lite/src/litert/scheduler.cc+4-0File content is under review, please try again later