Home
last modified time | relevance | path

Searched refs:x_tensor (Results 1 – 14 of 14) sorted by relevance

/third_party/mindspore/mindspore/core/ops/
Dselect.cc102 auto x_tensor = x->cast<tensor::TensorPtr>(); in SelectInferValue() local
105 MS_EXCEPTION_IF_NULL(x_tensor); in SelectInferValue()
112 auto type_id = x_tensor->data_type(); in SelectInferValue()
116 …SelectImpl<bool>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), data_… in SelectInferValue()
120 …SelectImpl<int>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), data_s… in SelectInferValue()
124 …SelectImpl<int8_t>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), dat… in SelectInferValue()
128 …SelectImpl<int16_t>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), da… in SelectInferValue()
132 …SelectImpl<int32_t>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), da… in SelectInferValue()
136 …SelectImpl<int64_t>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), da… in SelectInferValue()
140 …SelectImpl<uint32_t>(cond_data, x_tensor->data_c(), y_tensor->data_c(), result_tensor->data_c(), d… in SelectInferValue()
[all …]
Dabs.cc71 auto x_tensor = x->cast<tensor::TensorPtr>(); in AbsInferValue() local
72 if (x_tensor == nullptr) { in AbsInferValue()
76 auto data_size = x_tensor->DataSize(); in AbsInferValue()
77 auto dtype = x_tensor->data_type(); in AbsInferValue()
80 auto x_datac = x_tensor->data_c(); in AbsInferValue()
128 MS_EXCEPTION(TypeError) << "Abs unsupported data type: " << x_tensor->ToString(); in AbsInferValue()
Dsquare.cc68 auto x_tensor = x->cast<tensor::TensorPtr>(); in SquareInferValue() local
69 if (x_tensor == nullptr) { in SquareInferValue()
73 auto data_size = x_tensor->DataSize(); in SquareInferValue()
74 auto dtype = x_tensor->data_type(); in SquareInferValue()
77 auto x_datac = x_tensor->data_c(); in SquareInferValue()
125 MS_EXCEPTION(TypeError) << "Square unsupported data type: " << x_tensor->ToString(); in SquareInferValue()
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32_grad/
Dpooling_grad_fp32_tests.cc141 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
142 x_tensor.set_data(input1_data); in TEST_F()
144 std::vector<lite::Tensor *> inputs = {&x_tensor, &x_tensor, &dy_tensor}; in TEST_F()
181 x_tensor.set_data(nullptr); in TEST_F()
214 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
215 x_tensor.set_data(input1_data); in TEST_F()
217 std::vector<lite::Tensor *> inputs = {&x_tensor, &x_tensor, &dy_tensor}; in TEST_F()
252 x_tensor.set_data(nullptr); in TEST_F()
281 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
282 x_tensor.set_data(x_data); in TEST_F()
[all …]
Ddeconvolution_grad_fp32_tests.cc81 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
82 x_tensor.set_data(input_data); in TEST_F()
89 std::vector<lite::Tensor *> inputs = {&dy_tensor, &x_tensor}; in TEST_F()
134 x_tensor.set_data(nullptr); in TEST_F()
189 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
190 x_tensor.set_data(input_data); in TEST_F()
197 std::vector<lite::Tensor *> inputs = {&dy_tensor, &x_tensor}; in TEST_F()
237 x_tensor.set_data(nullptr); in TEST_F()
294 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
295 x_tensor.set_data(input_data); in TEST_F()
[all …]
Dbn_grad_fp32_test.cc60 auto x_tensor = CreateInTensor("./bngrad/input_x_2_4_5_3.bin", {batch, height, width, channels}); in TEST_F() local
61 ASSERT_NE(x_tensor, nullptr); in TEST_F()
77 std::vector<lite::Tensor *> inputs = {dy_tensor, x_tensor, scale_tensor, mean_tensor, var_tensor}; in TEST_F()
131 auto x_tensor = CreateInTensor("./bngrad/input_x_2_4_5_3.bin", {batch, height, width, channels}); in TEST_F() local
153 …std::vector<lite::Tensor *> inputs = {x_tensor, &scale_tensor, &bias_tensor, &mean_tensor, &var_te… in TEST_F()
206 delete[] reinterpret_cast<float *>(x_tensor->MutableData()); in TEST_F()
212 x_tensor->set_data(nullptr); in TEST_F()
213 delete x_tensor; in TEST_F()
Dconvolution_grad_fp32_tests.cc102 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
103 x_tensor.set_data(input_data); in TEST_F()
110 std::vector<lite::Tensor *> inputs = {&dy_tensor, &x_tensor}; in TEST_F()
151 x_tensor.set_data(nullptr); in TEST_F()
256 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
257 x_tensor.set_data(input_data); in TEST_F()
264 std::vector<lite::Tensor *> inputs = {&dy_tensor, &x_tensor}; in TEST_F()
299 x_tensor.set_data(nullptr); in TEST_F()
406 lite::Tensor x_tensor(TypeId::kNumberTypeFloat32, dim_x); in TEST_F() local
407 x_tensor.set_data(input_data); in TEST_F()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/
Dpower_infer.c27 const TensorC *x_tensor = inputs[0]; in PowerInferShape() local
40 SetDataTypeFormat(output_tensor, x_tensor); in PowerInferShape()
45 …qual = ShapeEqual(exp_tensor->shape_, exp_tensor->shape_size_, x_tensor->shape_, x_tensor->shape_s… in PowerInferShape()
51 SetShapeTensor(output_tensor, x_tensor); in PowerInferShape()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/
Ddeconvolution_grad_filter.cc40 auto *x_tensor = in_tensors_.at(1); in Init() local
46 MS_CHECK_TRUE_RET(x_tensor->shape().size() == COMM_SHAPE_SIZE, RET_ERROR); in Init()
49 conv_param->input_batch_ = x_tensor->shape().at(kNHWC_N); in Init()
50 conv_param->input_h_ = x_tensor->shape().at(kNHWC_H); in Init()
51 conv_param->input_w_ = x_tensor->shape().at(kNHWC_W); in Init()
53 conv_param->input_channel_ = x_tensor->shape().at(kNHWC_C); in Init()
Dconvolution_grad_filter.cc41 auto *x_tensor = in_tensors_.at(1); in ReSize() local
42 CHECK_NULL_RETURN(x_tensor); in ReSize()
49 conv_param->input_batch_ = x_tensor->shape().at(kNHWC_N); in ReSize()
50 conv_param->input_h_ = x_tensor->shape().at(kNHWC_H); in ReSize()
51 conv_param->input_w_ = x_tensor->shape().at(kNHWC_W); in ReSize()
53 conv_param->input_channel_ = x_tensor->shape().at(kNHWC_C); in ReSize()
/third_party/mindspore/tests/ut/cpp/optimizer/
Dlib_test.cc101 …tensor::TensorPtr x_tensor = std::make_shared<tensor::Tensor>(kFloat32->type_id(), std::vector<int… in TEST_F() local
104 AbstractBasePtr abstract_v1 = abstract::FromValue(x_tensor, true); in TEST_F()
184 tensor::TensorPtr x_tensor = std::make_shared<tensor::Tensor>(kFloat32->type_id(), shp); in TEST_F() local
185 auto x_abstract = x_tensor->ToAbstract(); in TEST_F()
214 tensor::TensorPtr x_tensor = std::make_shared<tensor::Tensor>(kFloat32->type_id(), shp); in TEST_F() local
215 auto x_abstract = x_tensor->ToAbstract(); in TEST_F()
224 tensor::TensorPtr x_tensor = std::make_shared<tensor::Tensor>(kFloat32->type_id(), shp); in TEST_F() local
225 auto x_abstract = x_tensor->ToAbstract(); in TEST_F()
280 tensor::TensorPtr x_tensor = std::make_shared<tensor::Tensor>(kFloat32->type_id(), shp); in TEST_F() local
281 auto x_abstract = x_tensor->ToAbstract(); in TEST_F()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16_grad/
Dconvolution_fp16_grad_filter.cc39 auto *x_tensor = in_tensors_.at(1); in ReSize() local
40 CHECK_NULL_RETURN(x_tensor); in ReSize()
46 conv_param->input_batch_ = x_tensor->shape().at(kNHWC_N); in ReSize()
47 conv_param->input_h_ = x_tensor->shape().at(kNHWC_H); in ReSize()
48 conv_param->input_w_ = x_tensor->shape().at(kNHWC_W); in ReSize()
50 conv_param->input_channel_ = x_tensor->shape().at(kNHWC_C); in ReSize()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/
Darithmetic_simplify.cc139 auto x_tensor = GetValueNode<tensor::TensorPtr>(x_->cast<ValueNodePtr>()); in operator ()() local
140 x_shape = x_tensor->shape(); in operator ()()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/static_analysis/
Dprim.cc1550 auto x_tensor = dyn_cast<AbstractTensor>(x); in IsSubtypeArray() local
1553 if (x_tensor == nullptr || model_tensor == nullptr) { in IsSubtypeArray()
1561 return IsSubtype(x_tensor->element(), model_tensor->element()); in IsSubtypeArray()