Home
last modified time | relevance | path

Searched refs:in_tensors_ (Results 1 – 25 of 306) sorted by relevance

12345678910>>...13

/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dfused_batchnorm_fp32.cc27 CHECK_LESS_RETURN(in_tensors_.size(), DIMENSION_5D); in ReSize()
47 auto scale = in_tensors_.at(SECOND_INPUT); in InitConstTensor()
48 auto offset = in_tensors_.at(THIRD_INPUT); in InitConstTensor()
49 auto mean = in_tensors_.at(FOURTH_INPUT); in InitConstTensor()
50 auto variance = in_tensors_.at(FIFTH_INPUT); in InitConstTensor()
77 if (IsTrain() && IsTrainable() && in_tensors_.size() >= DIMENSION_5D) { in Run()
78 float *in = static_cast<float *>(in_tensors_.at(FIRST_INPUT)->data()); in Run()
79 float *scale = static_cast<float *>(in_tensors_.at(SECOND_INPUT)->data()); in Run()
80 float *offset = static_cast<float *>(in_tensors_.at(THIRD_INPUT)->data()); in Run()
83 float *save_mean = static_cast<float *>(in_tensors_.at(FOURTH_INPUT)->data()); in Run()
[all …]
Dspace_to_batch_fp32.cc29 auto input_tensor = in_tensors_.at(FIRST_INPUT); in ProcessInput()
37 auto block_shape_data = in_tensors_.at(SECOND_INPUT)->data(); in ProcessInput()
40 for (int i = 0; i < in_tensors_.at(SECOND_INPUT)->ElementsNum(); i++) { in ProcessInput()
43 auto padding_data = in_tensors_.at(THIRD_INPUT)->data(); in ProcessInput()
46 for (int i = 0; i < in_tensors_.at(THIRD_INPUT)->ElementsNum(); i++) { in ProcessInput()
52 CHECK_LESS_RETURN(in_tensors_.size(), 1); in Init()
67 if (in_tensors_.size() == DIMENSION_3D) { in ReSize()
68 if (in_tensors_.at(SECOND_INPUT) != nullptr && in_tensors_.at(SECOND_INPUT)->IsConst() && in ReSize()
69 in_tensors_.at(THIRD_INPUT) != nullptr && in_tensors_.at(THIRD_INPUT)->IsConst()) { in ReSize()
73 auto input_tensor = in_tensors_.at(FIRST_INPUT); in ReSize()
[all …]
Dbatch_to_space_fp32.cc28 CHECK_LESS_RETURN(in_tensors_.size(), DIMENSION_3D); in Processinput()
29 CHECK_NULL_RETURN(in_tensors_[DIMENSION_1D]); in Processinput()
30 CHECK_NULL_RETURN(in_tensors_[DIMENSION_2D]); in Processinput()
31 auto block_shape_data = in_tensors_[DIMENSION_1D]->data(); in Processinput()
32 auto crops_data = in_tensors_[DIMENSION_2D]->data(); in Processinput()
37 CHECK_LESS_RETURN(in_tensors_[DIMENSION_1D]->ElementsNum(), BATCH_TO_SPACE_BLOCK_SHAPE_SIZE); in Processinput()
38 CHECK_LESS_RETURN(in_tensors_[DIMENSION_2D]->ElementsNum(), COMM_SHAPE_SIZE); in Processinput()
53 CHECK_LESS_RETURN(in_tensors_.size(), 1); in Init()
55 MS_ASSERT(in_tensors_[0]->format() == mindspore::NHWC); in Init()
63 MS_ASSERT(in_tensors_[0]->shape().size() == COMM_SHAPE_SIZE); in ReSize()
[all …]
Ddetection_post_process_fp32.cc30 CHECK_LESS_RETURN(in_tensors_.size(), C2NUM); in GetInputData()
31 …if ((in_tensors_.at(0)->data_type() != kNumberTypeFloat32 && in_tensors_.at(0)->data_type() != kNu… in GetInputData()
32 …(in_tensors_.at(1)->data_type() != kNumberTypeFloat32 && in_tensors_.at(1)->data_type() != kNumber… in GetInputData()
36 CHECK_NULL_RETURN(in_tensors_.at(0)->data()); in GetInputData()
37 CHECK_NULL_RETURN(in_tensors_.at(1)->data()); in GetInputData()
38 input_boxes_ = reinterpret_cast<float *>(in_tensors_.at(0)->data()); in GetInputData()
39 input_scores_ = reinterpret_cast<float *>(in_tensors_.at(1)->data()); in GetInputData()
Dbatchnorm_fp32.cc30 CHECK_LESS_RETURN(in_tensors_.size(), DIMENSION_3D); in Init()
32 CHECK_NULL_RETURN(in_tensors_[0]); in Init()
33 CHECK_NULL_RETURN(in_tensors_[1]); in Init()
34 CHECK_NULL_RETURN(in_tensors_[kNumInput2]); in Init()
64 auto input_shapes = in_tensors_.at(0)->shape(); in FillParam()
80 CHECK_LESS_RETURN(MAX_MALLOC_SIZE, in_tensors_.at(1)->Size()); in InitConstTensor()
81 CHECK_LESS_RETURN(MAX_MALLOC_SIZE, in_tensors_.at(kNumInput2)->Size()); in InitConstTensor()
82 mean_ = malloc(in_tensors_.at(SECOND_INPUT)->Size()); in InitConstTensor()
83 variance_ = malloc(in_tensors_.at(THIRD_INPUT)->Size()); in InitConstTensor()
89 auto in_tensor_mean_data = in_tensors_.at(SECOND_INPUT)->MutableData(); in InitConstTensor()
[all …]
Drange_fp32.cc31 CHECK_LESS_RETURN(in_tensors_.size(), 1); in Init()
40 …if (in_tensors_[0]->data_type() == kNumberTypeFloat32 || in_tensors_[0]->data_type() == kNumberTyp… in ReSize()
41 in_tensors_[0]->data_type() == kNumberTypeFloat) { in ReSize()
50 if (in_tensors_.size() == 3) { in Run()
52 …rpret_cast<int *>(out_tensors_.at(0)->data()), *reinterpret_cast<int *>(in_tensors_.at(0)->data()), in Run()
53 *reinterpret_cast<int *>(in_tensors_.at(2)->data()), out_tensors_.at(0)->shape()[0]); in Run()
56 *reinterpret_cast<float *>(in_tensors_.at(0)->data()), in Run()
57 *reinterpret_cast<float *>(in_tensors_.at(2)->data()), out_tensors_.at(0)->shape()[0]); in Run()
65 MS_LOG(ERROR) << "Unsupported parameter type : " << in_tensors_.at(0)->data_type() << "."; in Run()
Daddn_fp32.cc41 CHECK_LESS_RETURN(in_tensors_.size(), C2NUM); in Init()
62 auto input0_data = reinterpret_cast<float *>(in_tensors_[0]->MutableData()); in Run()
63 auto input1_data = reinterpret_cast<float *>(in_tensors_[1]->MutableData()); in Run()
69 if (in_tensors_[0]->shape() == in_tensors_[1]->shape()) { in Run()
73 param.in_elements_num0_ = in_tensors_[0]->ElementsNum(); in Run()
74 param.in_elements_num1_ = in_tensors_[1]->ElementsNum(); in Run()
80 for (size_t i = 2; i < in_tensors_.size(); ++i) { in Run()
81 auto in_data = reinterpret_cast<float *>(in_tensors_[i]->MutableData()); in Run()
83 if (in_tensors_[i]->shape() == out_tensors_[0]->shape()) { in Run()
87 param.in_elements_num0_ = in_tensors_[i]->ElementsNum(); in Run()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/
Dfused_batchnorm_fp16.cc45 std::fill(current_mean, current_mean + in_tensors_.at(kInCurrentMeanIdx)->ElementsNum(), 0.f); in CalcMeanVar()
46 std::fill(current_var, current_var + in_tensors_.at(kInCurrentVarIdx)->ElementsNum(), 0.f); in CalcMeanVar()
59 memcpy(scale_, scale, in_tensors_.at(kInScaleIdx)->Size()); in CalcMeanVar()
60 memcpy(offset_, offset, in_tensors_.at(kInOffsetIdx)->Size()); in CalcMeanVar()
68 if (in_tensors_.at(0)->data_type() == kNumberTypeFloat32) { in DoExecute()
69 MS_ASSERT(in_tensors_.size() == kMaxInIdx); in DoExecute()
71 auto input = in_tensors_.at(0); in DoExecute()
72 auto scale = in_tensors_.at(kInScaleIdx); in DoExecute()
73 auto offset = in_tensors_.at(kInOffsetIdx); in DoExecute()
74 auto mean = in_tensors_.at(kInCurrentMeanIdx); in DoExecute()
[all …]
Daddn_fp16.cc58 auto input0_data = reinterpret_cast<float16_t *>(in_tensors_[0]->MutableData()); in Run()
60 auto input1_data = reinterpret_cast<float16_t *>(in_tensors_[1]->MutableData()); in Run()
65 if (in_tensors_[0]->shape() == in_tensors_[1]->shape()) { in Run()
69 param.in_elements_num0_ = in_tensors_[0]->ElementsNum(); in Run()
70 param.in_elements_num1_ = in_tensors_[1]->ElementsNum(); in Run()
76 for (size_t i = 2; i < in_tensors_.size(); ++i) { in Run()
77 CHECK_NULL_RETURN(in_tensors_[i]->data()); in Run()
78 if (in_tensors_[i]->shape() == out_tensors_[0]->shape()) { in Run()
79 …ElementAddFp16(reinterpret_cast<float16_t *>(in_tensors_[i]->data()), out_data, out_data, elements… in Run()
82 param.in_elements_num0_ = in_tensors_[i]->ElementsNum(); in Run()
[all …]
Dscale_fp16.cc34 auto scale_tensor = in_tensors_.at(1); in InitScaleOffset()
37 if (in_tensors_.size() == 2) { in InitScaleOffset()
40 auto offset_tensor = in_tensors_.at(2); in InitScaleOffset()
47 if (in_tensors_.size() < 2 || in_tensors_.size() > 3) { in Init()
48 …MS_LOG(ERROR) << "inputs to Scale operator should be 2 or 3, but " << in_tensors_.size() << " is g… in Init()
103 auto input_tensor = in_tensors_.at(0); in Run()
136 …scale_ = ConvertInputFp32toFp16(in_tensors_.at(1), static_cast<const lite::InnerContext *>(this->m… in MallocAssignTmpBuffer()
140 if (in_tensors_.size() == 3) { in MallocAssignTmpBuffer()
141 …offset_ = ConvertInputFp32toFp16(in_tensors_.at(2), static_cast<const lite::InnerContext *>(this->… in MallocAssignTmpBuffer()
146 MS_CHECK_INT_MUL_NOT_OVERFLOW(in_tensors_.at(1)->ElementsNum(), sizeof(float16_t), RET_ERROR); in MallocAssignTmpBuffer()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/
Dbatchnorm.cc39 if (in_tensors_.size() != INPUT_TENSOR_SIZE_5 || out_tensors_.size() != OUTPUT_TENSOR_SIZE_1) { in CheckSpecs()
40 MS_LOG(WARNING) << "in size: " << in_tensors_.size() << ", out size: " << out_tensors_.size(); in CheckSpecs()
43 if (in_tensors_.at(0)->shape().size() != DIMENSION_4D) { in CheckSpecs()
44 …MS_LOG(WARNING) << "The dim of in_tensors->shape must be 4 but your dim is : " << in_tensors_.at(0… in CheckSpecs()
47 if (in_tensors_.at(0)->shape()[0] > 1) { in CheckSpecs()
51 CHECK_NULL_RETURN(in_tensors_[kNumInput0]); in CheckSpecs()
52 CHECK_NULL_RETURN(in_tensors_[kNumInput1]); in CheckSpecs()
53 CHECK_NULL_RETURN(in_tensors_[kNumInput2]); in CheckSpecs()
54 CHECK_NULL_RETURN(in_tensors_[kNumInput3]); in CheckSpecs()
55 CHECK_NULL_RETURN(in_tensors_[kNumInput4]); in CheckSpecs()
[all …]
Dstack.cc38 for (int i = 0; i < in_tensors_.size(); i++) { in RunAxis0()
39 auto src_data = in_tensors_[i]->data(); in RunAxis0()
74 if (in_tensors_.size() != INPUT_TENSOR_SIZE_2 && out_tensors_.size() != OUTPUT_TENSOR_SIZE_1) { in CheckSpecs()
78 for (auto &tensor : in_tensors_) { in CheckSpecs()
90 if (in_tensors_[0]->shape().size() > DIMENSION_4D || in_tensors_[0]->shape().size() <= 0) { in CheckSpecs()
94 axis_ = axis_ < 0 ? axis_ + in_tensors_[0]->shape().size() : axis_; in CheckSpecs()
99 if (axis_ > in_tensors_[0]->shape().size()) { in CheckSpecs()
107 int arg_cn = in_tensors_.size() + 1; in SetConstArgs()
109 for (int i = 0; i < in_tensors_[0]->shape().size(); ++i) { in SetConstArgs()
110 inshape_tmp.s[i] = in_tensors_[0]->shape()[i]; in SetConstArgs()
[all …]
Dspace_to_batch_nd.cc31 if (in_tensors_.size() != INPUT_TENSOR_SIZE_1 || out_tensors_.size() != OUTPUT_TENSOR_SIZE_1) { in CheckSpecs()
32 MS_LOG(WARNING) << "in size: " << in_tensors_.size() << ", out size: " << out_tensors_.size(); in CheckSpecs()
35 …if (in_tensors_[0]->data_type() != kNumberTypeFloat32 && in_tensors_[0]->data_type() != kNumberTyp… in CheckSpecs()
36 MS_LOG(WARNING) << "Unsupported data type " << in_tensors_[0]->data_type(); in CheckSpecs()
39 …if (in_tensors_[0]->shape().size() != DIMENSION_4D && out_tensors_[0]->shape().size() != DIMENSION… in CheckSpecs()
40 …MS_LOG(WARNING) << "input/output shape size must be 4, actual: " << in_tensors_[0]->shape().size()… in CheckSpecs()
46 param->padded_in_shape_[kNHWC_N] = in_tensors_[0]->shape().at(kNHWC_N); in CheckSpecs()
47 …param->padded_in_shape_[kNHWC_H] = in_tensors_[0]->shape().at(kNHWC_H) + param->paddings_[0] + par… in CheckSpecs()
48 …param->padded_in_shape_[kNHWC_W] = in_tensors_[0]->shape().at(kNHWC_W) + param->paddings_[2] + par… in CheckSpecs()
49 param->padded_in_shape_[kNHWC_C] = in_tensors_[0]->shape().at(kNHWC_C); in CheckSpecs()
[all …]
Dmatmul.cc32 bool IsUseStrassenMatmul(const std::vector<lite::Tensor *> &in_tensors_) { in IsUseStrassenMatmul() argument
33 if (in_tensors_.at(0)->shape().size() == DIMENSION_2D) { in IsUseStrassenMatmul()
34 auto shape0 = in_tensors_.at(0)->shape(); in IsUseStrassenMatmul()
35 auto shape1 = in_tensors_.at(1)->shape(); in IsUseStrassenMatmul()
36 if (in_tensors_.at(1)->IsConst() && (shape0[0] == shape0[1]) && (shape1[0] == shape1[1]) && in IsUseStrassenMatmul()
48 if (!(in_tensors_.size() == INPUT_TENSOR_SIZE_2 || in_tensors_.size() == INPUT_TENSOR_SIZE_3) || in CheckSpecs()
50 MS_LOG(WARNING) << "in size: " << in_tensors_.size() << ", out size: " << out_tensors_.size(); in CheckSpecs()
60 act_weight_ = !in_tensors_[1]->IsConst(); in CheckSpecs()
62 if (in_tensors_[0]->shape().size() != out_tensors_[0]->shape().size() || in CheckSpecs()
63in_tensors_[0]->shape().size() < DIMENSION_2D || in_tensors_[0]->shape().size() > DIMENSION_4D) { in CheckSpecs()
[all …]
Dscale.cc43 auto in_tensor = in_tensors_.at(0); in CheckSpecs()
45 auto scale_tensor = in_tensors_.at(1); in CheckSpecs()
85 auto *in_tensor = in_tensors_[0]; in InitWeights()
86 auto *scale_tensor = in_tensors_[1]; in InitWeights()
87 auto *offset_tensor = in_tensors_[2]; in InitWeights()
159 auto in_tensor = in_tensors_.at(0); in Prepare()
161 auto scale_tensor = in_tensors_.at(1); in Prepare()
217 if (ocl_runtime_->SetKernelArg(kernel_, arg_idx++, in_tensors_[0]->data()) != CL_SUCCESS) { in SetKernelArg()
221 void *scale = scale_ptr_ == nullptr ? in_tensors_[1]->data() : scale_ptr_; in SetKernelArg()
222 void *offset = offset_ptr_ == nullptr ? in_tensors_[2]->data() : offset_ptr_; in SetKernelArg()
[all …]
Dfullconnection.cc38 if ((in_tensors_.size() != INPUT_TENSOR_SIZE_2 && in_tensors_.size() != INPUT_TENSOR_SIZE_3) || in CheckSpecs()
40 MS_LOG(WARNING) << "in size: " << in_tensors_.size() << ", out size: " << out_tensors_.size(); in CheckSpecs()
61 auto intensor_shape = GpuTensorInfo(in_tensors_[0]); in CheckSpecs()
66 if (!in_tensors_.at(kWeightIndex)->IsConst()) { in CheckSpecs()
72 if (in_tensors_.at(kWeightIndex)->shape().size() != DIMENSION_2D) { in CheckSpecs()
76 if (intensor_shape.C != in_tensors_.at(kWeightIndex)->shape()[1]) { in CheckSpecs()
82 if (in_tensors_.size() == INPUT_TENSOR_SIZE_3 && !in_tensors_.at(2)->IsConst()) { in CheckSpecs()
137 auto intensor_shape = GpuTensorInfo(in_tensors_[0]); in InitFilter()
155 …void *src_data = stored_weight_ == nullptr ? in_tensors_.at(kWeightIndex)->data() : stored_weight_; in InitFilter()
159 bool isModelFp16 = in_tensors_.at(kWeightIndex)->data_type() == kNumberTypeFloat16; in InitFilter()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/base/
Dselect.cc40 MS_ASSERT(in_tensors_.size() >= 3); in Run()
41 MS_ASSERT(in_tensors_.size() == out_tensors_.size() * 2 + 1); in Run()
42 auto bool_tensor = in_tensors_.front(); in Run()
52 …auto ret = MoveData(this->out_tensors_.begin(), this->out_tensors_.end(), this->in_tensors_.begin(… in Run()
53 this->in_tensors_.begin() + 1 + this->out_tensors_.size()); in Run()
60 this->in_tensors_.begin() + 1 + this->out_tensors_.size(), in Run()
61 this->in_tensors_.begin() + 1 + 2 * this->out_tensors_.size()); in Run()
68 MS_ASSERT(bool_tensor->shape().size() == in_tensors_.at(1)->shape().size()); in Run()
69 for (size_t i = 0; i < in_tensors_.at(1)->shape().size(); i++) { in Run()
70 if (bool_tensor->shape()[i] != in_tensors_.at(1)->shape()[i]) { in Run()
[all …]
Dquant_dtype_cast.cc33 if (in_tensors_.size() != 1) { in Init()
34 MS_LOG(ERROR) << "inputs number should be 1, but " << in_tensors_.size() << " is given."; in Init()
41 auto in_tensor = in_tensors_.front(); in Init()
61 auto in_tensor = in_tensors_.front(); in ReSize()
79 if (in_tensors_.front()->quant_params().empty() && out_tensors_.front()->quant_params().empty()) { in QuantDTypeCast()
86 : in_tensors_.front()->quant_params().front(); in QuantDTypeCast()
109 auto input_quant_arg = in_tensors_.front()->quant_params().front(); in QuantDTypeCast()
146 if (in_tensors_[0]->data_type() == TypeId::kNumberTypeInt8 && in Run()
148 int8_ptr_ = reinterpret_cast<int8_t *>(in_tensors_[0]->data()); in Run()
153 } else if (in_tensors_[0]->data_type() == TypeId::kNumberTypeFloat32 && in Run()
[all …]
Dtile_base.cc33 CHECK_LESS_RETURN(in_tensors_.size(), 1); in Init()
44 if (in_tensors_.size() == kDoubleInputsSize) { in ReSize()
45 if (in_tensors_[1]->ElementsNum() > static_cast<int>(in_tensors_[0]->shape().size())) { in ReSize()
49 …if (in_tensors_[1]->data_type() != kNumberTypeInt && in_tensors_[1]->data_type() != kNumberTypeInt… in ReSize()
50 MS_LOG(ERROR) << "in_tensors_[1]->data_type():" << in_tensors_[1]->data_type() in ReSize()
54 auto input1_addr = reinterpret_cast<int *>(in_tensors_[1]->data()); in ReSize()
55 for (int i = 0; i < in_tensors_[1]->ElementsNum(); ++i) { in ReSize()
60 tile_parameter_->in_dim_ = in_tensors_.at(0)->shape().size(); in ReSize()
63 tile_parameter_->in_shape_[i] = in_tensors_.at(0)->shape().at(i); in ReSize()
69 auto data_type = in_tensors_.at(0)->data_type(); in ReSize()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/
Dsgd.cc72 auto weight = reinterpret_cast<float *>(in_tensors_.at(0)->MutableData()); in Execute()
74 auto accumulate = reinterpret_cast<float *>(in_tensors_.at(3)->MutableData()); in Execute()
77 auto gradient = reinterpret_cast<float *>(in_tensors_.at(1)->MutableData()); in Execute()
79 CHECK_NULL_RETURN(in_tensors_.at(4)->MutableData()); in Execute()
80 float moment = reinterpret_cast<float *>(in_tensors_.at(4)->MutableData())[0]; in Execute()
81 int length = in_tensors_.at(0)->ElementsNum(); in Execute()
96 auto weight = reinterpret_cast<float *>(in_tensors_.at(0)->MutableData()); in ExecuteInit()
98 auto accumulate = reinterpret_cast<float *>(in_tensors_.at(3)->MutableData()); in ExecuteInit()
101 auto gradient = reinterpret_cast<float *>(in_tensors_.at(1)->MutableData()); in ExecuteInit()
103 CHECK_NULL_RETURN(in_tensors_.at(4)->MutableData()); in ExecuteInit()
[all …]
Dadam.cc65 CHECK_LESS_RETURN(in_tensors_.size(), INPUT_MAX_NUM); in Execute()
66 auto weight = reinterpret_cast<float *>(in_tensors_.at(0)->MutableData()); in Execute()
67 auto m = reinterpret_cast<float *>(in_tensors_.at(1)->MutableData()); in Execute()
68 auto v = reinterpret_cast<float *>(in_tensors_.at(2)->MutableData()); in Execute()
69 auto beta1_power = reinterpret_cast<float *>(in_tensors_.at(3)->MutableData())[0]; in Execute()
70 auto beta2_power = reinterpret_cast<float *>(in_tensors_.at(4)->MutableData())[0]; in Execute()
72 auto beta1 = reinterpret_cast<float *>(in_tensors_.at(6)->MutableData())[0]; in Execute()
73 auto beta2 = reinterpret_cast<float *>(in_tensors_.at(7)->MutableData())[0]; in Execute()
74 auto eps = reinterpret_cast<float *>(in_tensors_.at(8)->MutableData())[0]; in Execute()
75 auto gradient = reinterpret_cast<float *>(in_tensors_.at(9)->MutableData()); in Execute()
[all …]
Darithmetic_grad.cc32 CHECK_LESS_RETURN(in_tensors_.size(), FOURTH_INPUT); in Init()
33 CHECK_NULL_RETURN(in_tensors_.at(FIRST_INPUT)); in Init()
34 CHECK_NULL_RETURN(in_tensors_.at(SECOND_INPUT)); in Init()
35 CHECK_NULL_RETURN(in_tensors_.at(THIRD_INPUT)); in Init()
56 tile_data0 = new (std::nothrow) float[in_tensors_.at(0)->ElementsNum()]; in Init()
61 tile_data1 = new (std::nothrow) float[in_tensors_.at(0)->ElementsNum()]; in Init()
68 tile_data2 = new (std::nothrow) float[in_tensors_.at(0)->ElementsNum()]; in Init()
120 auto x1_data = reinterpret_cast<float *>(in_tensors_[1]->MutableData()); in ArithmeticGradMul()
121 auto x2_data = reinterpret_cast<float *>(in_tensors_[2]->MutableData()); in ArithmeticGradMul()
131 auto x1_data = reinterpret_cast<float *>(in_tensors_[1]->MutableData()); in ArithmeticGradMul1L()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/
Dscale_int8.cc51 auto *scale_ptr = reinterpret_cast<int8_t *>(in_tensors_.at(1)->data()); in InitScaleOffset()
57 if (in_tensors_.at(0)->ElementsNum() != in_tensors_.at(1)->ElementsNum()) { in InitScaleOffset()
64 TileOneDimensionInt8(reinterpret_cast<int8_t *>(in_tensors_.at(1)->data()), in InitScaleOffset()
71 if (in_tensors_.size() == kScaleBiasInputsSize) { in InitScaleOffset()
73 auto offset_tensor = in_tensors_.at(kOffsetIndex); in InitScaleOffset()
80 if (in_tensors_.at(0)->ElementsNum() != in_tensors_.at(kOffsetIndex)->ElementsNum()) { in InitScaleOffset()
91 TileOneDimensionInt8(reinterpret_cast<int8_t *>(in_tensors_.at(kOffsetIndex)->data()), in InitScaleOffset()
102 auto in_tensor = in_tensors_.at(0); in InitParameter()
104 auto scale_tensor = in_tensors_.at(1); in InitParameter()
127 size_t input0_size = in_tensors_.at(0)->shape().size(); in InitParameter()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/control/
Dtensorlist_setitem.cc34 CHECK_LESS_RETURN(in_tensors_.size(), kNumInputSize); in Init()
36 CHECK_NULL_RETURN(in_tensors_.at(0)); in Init()
37 CHECK_NULL_RETURN(in_tensors_.at(1)); in Init()
38 CHECK_NULL_RETURN(in_tensors_.at(kNumInput2)); in Init()
44 …if (in_tensors_[1]->data_type() != kNumberTypeInt && in_tensors_[1]->data_type() != kNumberTypeInt… in CheckParam()
45 … MS_LOG(ERROR) << "in_tensors_[1]->data_type():" << in_tensors_[1]->data_type() << " must be int"; in CheckParam()
48 if (in_tensors_[1]->ElementsNum() != 1) { in CheckParam()
49 …MS_LOG(ERROR) << "in_tensors_[1]->ElementsNum():" << in_tensors_[1]->ElementsNum() << " must be eq… in CheckParam()
59 out_shape.resize(new_tensors_size, in_tensors_[2]->shape()); in IncrementOutputSize()
60 auto ret = output0_->MallocTensorListData(in_tensors_[2]->data_type(), out_shape); in IncrementOutputSize()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16_grad/
Dbn_fp16_grad.cc49 CHECK_LESS_RETURN(in_tensors_.size(), 5); in ReSize()
51 CHECK_NULL_RETURN(in_tensors_.at(kNumInputDim_0)); in ReSize()
52 CHECK_NULL_RETURN(in_tensors_.at(kNumInputDim_1)); in ReSize()
53 CHECK_NULL_RETURN(in_tensors_.at(kNumInputDim_2)); in ReSize()
54 CHECK_NULL_RETURN(in_tensors_.at(kNumInputDim_3)); in ReSize()
55 CHECK_NULL_RETURN(in_tensors_.at(kNumInputDim_4)); in ReSize()
59 auto *input_x = in_tensors_.at(1); in ReSize()
67 for (int i = 0; i < in_tensors_.size(); i++) { in Init()
68 if (in_tensors_.at(i)->data_type() != kNumberTypeFloat16) { in Init()
76 auto *input_yt = in_tensors_.at(kNumInputDim_0); in DoExecute()
[all …]

12345678910>>...13