Home
last modified time | relevance | path

Searched refs:offset_tensor (Results 1 – 6 of 6) sorted by relevance

/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/
Dscale_fp32_coder.cc50 Tensor *offset_tensor = input_tensors_.at(kBiasIndex); in InitScaleOffset() local
51 MS_CHECK_PTR(offset_tensor); in InitScaleOffset()
53 …reinterpret_cast<float *>(allocator_->Malloc(kNumberTypeFloat32, offset_tensor->Size(), kOfflinePa… in InitScaleOffset()
55 MS_CHECK_TRUE(offset_tensor->Size() > 0, "invalid offset tensor size"); in InitScaleOffset()
56 …MS_CHECK_RET_CODE(memcpy_s(offset_, offset_tensor->Size(), offset_tensor->data(), offset_tensor->S… in InitScaleOffset()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dscale_fp32.cc70 auto offset_tensor = in_tensors_.at(2); in InitScaleOffset() local
71 MS_CHECK_TRUE_RET(scale_tensor->ElementsNum() == offset_tensor->ElementsNum(), RET_ERROR); in InitScaleOffset()
72 offset_ = reinterpret_cast<float *>(malloc(offset_tensor->ElementsNum() * sizeof(float))); in InitScaleOffset()
77 memcpy(offset_, offset_tensor->data(), offset_tensor->ElementsNum() * sizeof(float)); in InitScaleOffset()
186 auto offset_tensor = in_tensors_.at(2); in Run() local
187 offset_ = reinterpret_cast<float *>(offset_tensor->data()); in Run()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/
Dscale.cc87 auto *offset_tensor = in_tensors_[2]; in InitWeights() local
89 auto offset_dtype = offset_tensor->data_type(); in InitWeights()
99 MS_ASSERT(offset_tensor->data()); in InitWeights()
109 offset_ptr_ = allocator->Malloc(img_size, offset_tensor->data()); in InitWeights()
117 if ((scale_tensor->format() == mindspore::NHWC) && (offset_tensor->format() == mindspore::NHWC)) { in InitWeights()
134 GpuTensorInfo offset_shape = GpuTensorInfo(offset_tensor); in InitWeights()
136 bool offset_dtype_flag = offset_tensor->data_type() == kNumberTypeFloat16; in InitWeights()
137 …PackNHWCToNHWC4(offset_tensor->data(), offset_data.data(), offset_dtype_flag, fp16_enable, offset_… in InitWeights()
/third_party/mindspore/mindspore/lite/src/delegate/npu/op/
Dbatchnorm_npu.cc63 auto offset_tensor = ConverterToNPUTensor(in_tensors[OFFSET_INDEX]); in SetNPUInputs() local
64 offset_->set_attr_value(offset_tensor); in SetNPUInputs()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/
Dscale_fp16.cc40 auto offset_tensor = in_tensors_.at(2); in InitScaleOffset() local
41 malloc_offset_ = offset_tensor->data_type() == kNumberTypeFloat32; in InitScaleOffset()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/
Dscale_int8.cc73 auto offset_tensor = in_tensors_.at(kOffsetIndex); in InitScaleOffset() local
74 auto *offset_ptr = reinterpret_cast<int8_t *>(offset_tensor->data()); in InitScaleOffset()