!18774 delete log-depend from kernel.h
Merge pull request !18774 from ling/pr
This commit is contained in:
commit
b337eb0153
|
@ -21,7 +21,6 @@
|
|||
#include <utility>
|
||||
#include "schema/model_generated.h"
|
||||
#include "include/lite_utils.h"
|
||||
#include "src/common/log_adapter.h"
|
||||
#include "include/context.h"
|
||||
|
||||
namespace mindspore::kernel {
|
||||
|
@ -48,19 +47,13 @@ class Kernel {
|
|||
virtual schema::PrimitiveType type() const { return type_; }
|
||||
|
||||
virtual void set_inputs(const std::vector<mindspore::tensor::MSTensor *> &in_tensors) { this->inputs_ = in_tensors; }
|
||||
virtual void set_input(mindspore::tensor::MSTensor *in_tensor, int index) {
|
||||
MS_ASSERT(index < inputs_.size());
|
||||
this->inputs_[index] = in_tensor;
|
||||
}
|
||||
virtual void set_input(mindspore::tensor::MSTensor *in_tensor, int index) { this->inputs_[index] = in_tensor; }
|
||||
|
||||
virtual void set_outputs(const std::vector<mindspore::tensor::MSTensor *> &out_tensors) {
|
||||
this->outputs_ = out_tensors;
|
||||
}
|
||||
|
||||
virtual void set_output(mindspore::tensor::MSTensor *out_tensor, int index) {
|
||||
MS_ASSERT(index < outputs_.size());
|
||||
this->outputs_[index] = out_tensor;
|
||||
}
|
||||
virtual void set_output(mindspore::tensor::MSTensor *out_tensor, int index) { this->outputs_[index] = out_tensor; }
|
||||
|
||||
virtual const std::vector<mindspore::tensor::MSTensor *> &inputs() { return this->inputs_; }
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ class LiteKernel {
|
|||
if (desc_.provider == kBuiltin) {
|
||||
std::static_pointer_cast<InnerKernel>(kernel_)->set_in_tensor(in_tensor, index);
|
||||
} else {
|
||||
MS_ASSERT(index < kernel_->inputs.size());
|
||||
mindspore::tensor::MSTensor *ms_tensors(in_tensor);
|
||||
kernel_->set_input(ms_tensors, index);
|
||||
}
|
||||
|
@ -261,6 +262,7 @@ class LiteKernel {
|
|||
if (desc_.provider == kBuiltin) {
|
||||
std::static_pointer_cast<InnerKernel>(kernel_)->set_out_tensor(out_tensor, index);
|
||||
} else {
|
||||
MS_ASSERT(index < kernel_->outputs.size());
|
||||
mindspore::tensor::MSTensor *ms_tensors(out_tensor);
|
||||
kernel_->set_output(ms_tensors, index);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue