Home
last modified time | relevance | path

Searched refs:axes (Results 1 – 25 of 243) sorted by relevance

12345678910

/third_party/mindspore/mindspore/ops/composite/
Dmath_ops.py111 def _int_to_tuple_conv(axes): argument
116 if isinstance(axes[x], int):
117 axes[x] = (axes[x],)
118 return axes
122 def _check_axes(axes, prim_name=None): argument
127 validator.check_value_type('axes', axes, [int, tuple, list], "tensor dot")
128 if not isinstance(axes, int):
129 axes = list(axes) # to avoid immutability issues
130 if len(axes) != 2:
132 axes = _int_to_tuple_conv(axes) # convert before length checks
[all …]
/third_party/mindspore/tests/st/ops/cpu/
Dtest_batchdot_op.py27 def __init__(self, axes): argument
29 self.axes = axes
32 return C.batch_dot(x, y, self.axes)
36 def _reference_batch_dot(x, y, axes): argument
37 if isinstance(axes, int):
38 axes = [axes, axes]
39 elif isinstance(axes, tuple):
40 axes = list(axes)
41 if axes is None:
43 axes = [x.ndim - 1, y.ndim - 1]
[all …]
/third_party/libinput/test/
Dtest-tablet.c57 struct axis_replacement axes[] = { in START_TEST() local
64 litest_tablet_proximity_in(dev, 10, 10, axes); in START_TEST()
100 struct axis_replacement axes[] = { in START_TEST() local
118 litest_tablet_proximity_in(dev, 10, 10, axes); in START_TEST()
119 litest_tablet_proximity_in(dev2, 10, 10, axes); in START_TEST()
215 struct axis_replacement axes[] = { in START_TEST() local
221 litest_tablet_proximity_in(dev, 10, 10, axes); in START_TEST()
224 litest_axis_set_value(axes, ABS_DISTANCE, 0); in START_TEST()
225 litest_axis_set_value(axes, ABS_PRESSURE, 30); in START_TEST()
227 litest_tablet_motion(dev, 10, 10, axes); in START_TEST()
[all …]
/third_party/mindspore/tests/st/ops/gpu/
Dtest_tensordot_op.py27 def __init__(self, axes): argument
29 self.axes = axes
32 return C.tensor_dot(x, y, self.axes)
54 axes = ((1, 3), (2, 1))
60 network = NetTensorDot(axes)
62 np_result = np.tensordot(x1, x2, axes)
68 axes = 1
74 network = NetTensorDot(axes)
76 np_result = np.tensordot(x1, x2, axes)
82 axes = ([1], [0])
[all …]
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/
Dreduce_fp32_tests.cc42 … float *output_data, ReduceMode mode, const int *axes, const int num_axes, bool reduce_to_end,
71 … float *output_data, ReduceMode mode, const int *axes, const int num_axes, in Prepare() argument
83 memcpy(param_.axes_, axes, num_axes * sizeof(int)); in Prepare()
112 int axes[1] = {1}; in TEST_F() local
119 …Prepare(in_shape, out_shape, in, out, ReduceMode_ReduceMean, axes, axis_num, reduce_to_end, coeff); in TEST_F()
139 int axes[1] = {1}; in TEST_F() local
146 …Prepare(in_shape, out_shape, in, out, ReduceMode_ReduceMean, axes, axis_num, reduce_to_end, coeff); in TEST_F()
167 int axes[1] = {1}; in TEST_F() local
174 …Prepare(in_shape, out_shape, in, out, ReduceMode_ReduceMean, axes, axis_num, reduce_to_end, coeff); in TEST_F()
194 int axes[4] = {0, 1, 2, 3}; in TEST_F() local
[all …]
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/
Dreduce_int8_tests.cc39 int8_t *output_data, ReduceMode mode, const int *axes, const int num_axes);
66 … int8_t *output_data, ReduceMode mode, const int *axes, const int num_axes) { in Prepare() argument
79 memcpy(param_.axes_, axes, num_axes * sizeof(int)); in Prepare()
98 int axes[] = {3}; in TEST_F() local
107 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F()
123 int axes[] = {0}; in TEST_F() local
130 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F()
146 int axes[] = {-1}; in TEST_F() local
154 Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceSum, axes, num_axes); in TEST_F()
170 int axes[] = {0, 1, 2, 3}; in TEST_F() local
[all …]
/third_party/boost/boost/histogram/detail/
Daxes.hpp94 auto make_empty_dynamic_axes(const T& axes) { in make_empty_dynamic_axes() argument
95 return make_default(axes); in make_empty_dynamic_axes()
121 T axes = make_default(old_axes); in axes_transform() local
122 axes.reserve(old_axes.size()); in axes_transform()
123 for_each_axis(old_axes, [&](const auto& a) { axes.emplace_back(f(axes.size(), a)); }); in axes_transform()
124 return axes; in axes_transform()
158 unsigned axes_rank(const T& axes) { in axes_rank() argument
161 return static_cast<unsigned>(std::distance(begin(axes), end(axes))); in axes_rank()
170 void throw_if_axes_is_too_large(const T& axes) { in throw_if_axes_is_too_large() argument
171 if (axes_rank(axes) > BOOST_HISTOGRAM_DETAIL_AXES_LIMIT) in throw_if_axes_is_too_large()
[all …]
Dfill_n.hpp124 const std::size_t offset, S& storage, Axes& axes, const T* viter) { in fill_n_indices() argument
127 for_each_axis(axes, [eit = extents, sit = shifts](const auto& a) mutable { in fill_n_indices()
135 for_each_axis(axes, [&, stride = static_cast<std::size_t>(1), in fill_n_indices()
146 for_each_axis(axes, [&update_needed, eit = extents](const auto& a) mutable { in fill_n_indices()
150 storage_grower<Axes> g(axes); in fill_n_indices()
179 void fill_n_nd(const std::size_t offset, S& storage, A& axes, const std::size_t vsize, in fill_n_nd() argument
215 fill_n_indices(indices, start, n, offset, storage, axes, values); in fill_n_nd()
223 void fill_n_1(const std::size_t offset, S& storage, std::tuple<As...>& axes, in fill_n_1() argument
227 fill_n_nd<index_type>(offset, storage, axes, vsize, values, std::forward<Us>(us)...); in fill_n_1()
231 void fill_n_1(const std::size_t offset, S& storage, A& axes, const std::size_t vsize, in fill_n_1() argument
[all …]
Dat.hpp23 optional_index at(const A& axes, const std::tuple<Us...>& args) noexcept { in at() argument
27 stride *= linearize_index(idx, stride, axis_get<i>(axes), in at()
34 optional_index at(const A& axes, const U& args) noexcept { in at() argument
37 for_each_axis(axes, [&, it = begin(args), in at()
Dfill.hpp61 storage_grower(const A& axes) noexcept : axes_(axes) {} in storage_grower()
240 const Axes& axes, const Args& args) { in fill_2() argument
243 idx, axes, args); in fill_2()
250 auto fill_2(ArgTraits, mp11::mp_true, const std::size_t, Storage& st, Axes& axes, in fill_2() argument
258 auto& ax = axis_get<i>(axes); in fill_2()
265 storage_grower<Axes> g(axes); in fill_2()
300 auto fill(std::true_type, ArgTraits, const std::size_t offset, S& storage, A& axes, in fill() argument
316 if (axes_rank(axes) == ArgTraits::nargs::value) in fill()
317 return fill_2(ArgTraits{}, growing{}, offset, storage, axes, args); in fill()
318 else if (axes_rank(axes) == 1 && in fill()
[all …]
/third_party/libinput/src/
Devdev-totem.c39 struct tablet_axes axes; member
133 mm = evdev_device_units_to_mm(totem->device, &slot->axes.point); in totem_set_touch_device_enabled()
269 struct tablet_axes axes = {0}; in totem_slot_fetch_axes() local
274 axes = slot->axes; in totem_slot_fetch_axes()
280 slot->axes.point.x = libevdev_get_slot_value(device->evdev, in totem_slot_fetch_axes()
283 slot->axes.point.y = libevdev_get_slot_value(device->evdev, in totem_slot_fetch_axes()
294 slot->axes.rotation = (360 - angle) % 360; in totem_slot_fetch_axes()
312 slot->axes.size.major = (double)major/rmajor; in totem_slot_fetch_axes()
313 slot->axes.size.minor = (double)minor/rminor; in totem_slot_fetch_axes()
316 axes.point = slot->axes.point; in totem_slot_fetch_axes()
[all …]
Devdev-tablet.c103 const struct tablet_axes *axes) in tablet_history_push() argument
108 tablet->history.samples[index] = *axes; in tablet_history_push()
114 tablet_history_push(tablet, axes); in tablet_history_push()
429 x = tablet->axes.tilt.x; in convert_tilt_to_rotation()
430 y = tablet->axes.tilt.y; in convert_tilt_to_rotation()
438 tablet->axes.rotation = angle; in convert_tilt_to_rotation()
477 tablet->axes.point.x = value; in tablet_update_xy()
486 tablet->axes.point.y = value; in tablet_update_xy()
488 evdev_transform_absolute(device, &tablet->axes.point); in tablet_update_xy()
496 struct tablet_axes *axes, in tablet_tool_process_delta() argument
[all …]
/third_party/boost/boost/histogram/algorithm/
Dproject.hpp42 const auto& old_axes = unsafe_access::axes(h); in project()
43 auto axes = detail::static_if<detail::is_tuple<A>>( in project() local
53 using A2 = decltype(axes); in project()
54 auto result = histogram<A2, S>(std::move(axes), detail::make_default(old_storage)); in project()
55 auto idx = detail::make_stack_buffer<int>(unsafe_access::axes(result)); in project()
73 const auto& old_axes = unsafe_access::axes(h); in project()
76 auto axes = detail::make_empty_dynamic_axes(old_axes); in project() local
77 axes.reserve(c.size()); in project()
84 axes.emplace_back(detail::axis_get(old_axes, d)); in project()
89 histogram<decltype(axes), S>(std::move(axes), detail::make_default(old_storage)); in project()
[all …]
/third_party/mindspore/mindspore/
D_checkparam.py651 def check_transpose_axis(axes, ndim): argument
653 if not axes or (len(axes) == 1 and axes[0] is None):
656 if len(axes) == 1:
657 perm = axes[0]
667 if len(axes) != ndim:
669 return axes
700 def check_swapaxes_axis(axes, ndim): argument
702 if isinstance(axes, int):
703 Validator.check_axis_in_range(axes, ndim)
704 return axes % ndim
[all …]
/third_party/boost/libs/histogram/test/
Dutility_histogram.hpp38 auto make(static_tag, const Axes&... axes) { in make() argument
39 return make_histogram(axes...); in make()
43 auto make_s(static_tag, S&& s, const Axes&... axes) { in make_s() argument
44 return make_histogram_with(s, axes...); in make_s()
48 auto make(dynamic_tag, const Axes&... axes) { in make() argument
49 return make_histogram(make_axis_vector(axes...)); in make()
53 auto make_s(dynamic_tag, S&& s, const Axes&... axes) { in make_s() argument
54 return make_histogram_with(s, make_axis_vector(axes...)); in make_s()
Daxis_variant_test.cpp158 std::vector<variant> axes; in main() local
159 axes.push_back(axis::regular<>{2, -1, 1}); in main()
160 axes.push_back(axis::regular<double, tr::pow>{tr::pow{0.5}, 2, 1, 4}); in main()
161 axes.push_back(axis::category<>{A, B, C}); in main()
162 axes.push_back(axis::integer<>{-1, 1}); in main()
163 axes.push_back(axis::boolean<>{}); in main()
164 for (const auto& a : axes) { in main()
168 BOOST_TEST_NE(axes, std::vector<variant>{}); in main()
169 BOOST_TEST(axes == std::vector<variant>(axes)); in main()
216 axes_type axes(a); in main() local
[all …]
/third_party/mindspore/mindspore/lite/src/ops/populate/
Dslice_populate.cc39 auto axes = value->axes(); in PopulateSliceParameter() local
41 if (axes != nullptr) { in PopulateSliceParameter()
42 if (axes->size() > DIMENSION_8D) { in PopulateSliceParameter()
43 MS_LOG(ERROR) << "Invalid axes size: " << axes->size(); in PopulateSliceParameter()
47 for (size_t i = 0; i < axes->size(); ++i) { in PopulateSliceParameter()
48 param->axis_[i] = axes->Get(i); in PopulateSliceParameter()
/third_party/mindspore/mindspore/numpy/
Dutils_const.py91 def _check_axes_range(axes, ndim): argument
106 _check_axis_type(axes, True, True, True)
107 if isinstance(axes, (list, tuple)):
108 _check_element_int(axes)
109 axes = _canonicalize_axis(axes, ndim)
110 return axes
159 def _check_axis_valid(axes, ndim): argument
164 if axes is None:
165 axes = F.make_range(ndim)
166 return axes
[all …]
/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/
Donnx_slice_parser.cc36 std::vector<int32_t> axes; in Parse() local
49 axes.clear(); in Parse()
51 axes.push_back(static_cast<int>(std::min(onnx_node_attr.ints()[i], int_32_max))); in Parse()
72 } else if (!axes.empty()) { in Parse()
73 size = static_cast<int>(axes.size()); in Parse()
80 if (axes.empty()) { in Parse()
82 axes.push_back(i); in Parse()
90 prim->AddAttr("axes", MakeValue(axes)); in Parse()
/third_party/libinput/tools/
Dlibinput-measure-fuzz.py108 axes = {
115 if axes[0x35] is not None:
116 if axes[0x35] != axes[0x00]:
117 …rint_bold('WARNING: fuzz mismatch ABS_X: {}, ABS_MT_POSITION_X: {}'.format(axes[0x00], axes[0x35]))
119 if axes[0x36] is not None:
120 if axes[0x36] != axes[0x01]:
121 …rint_bold('WARNING: fuzz mismatch ABS_Y: {}, ABS_MT_POSITION_Y: {}'.format(axes[0x01], axes[0x36]))
123 xfuzz = axes[0x35] or axes[0x00]
124 yfuzz = axes[0x36] or axes[0x01]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/
Dreduce_infer.c92 int *axes = (int *)axes_input->data_; in ReduceInferShape() local
93 NNACL_CHECK_NULL_RETURN_ERR(axes); in ReduceInferShape()
112 ShapeSet(actual_axes, &actual_axes_size, axes, num_axes); in ReduceInferShape()
119 if (axes[0] < -1 * rank || axes[0] >= rank) { in ReduceInferShape()
123 begin_axis = axes[0] < 0 ? axes[0] + rank : axes[0]; in ReduceInferShape()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32_grad/
Dreduce_grad.c21 … const int *axes, int num_axes, float *output_data, const int *output_dims, int output_num_dims) { in ReduceMeanByAxes() argument
35 size_t output_offset = GetOutputOffset(input_num_dims, input_dims, input_iter, num_axes, axes); in ReduceMeanByAxes()
42 size_t current = (size_t)(input_dims[axes[idx]]); in ReduceMeanByAxes()
74 int axes[5] = {0}; in ReduceSumByAxes() local
78 axes[num_axes++] = i; in ReduceSumByAxes()
85 size_t output_offset = GetOutputOffset(num_dims, input_dims, input_iter, num_axes, axes); in ReduceSumByAxes()
/third_party/boost/libs/histogram/examples/
Dgetting_started_listing_02.cpp30 std::vector<variant> axes; in main() local
31 axes.emplace_back(cat({"red", "blue"})); in main()
32 axes.emplace_back(reg(3, 0.0, 1.0, "x")); in main()
33 axes.emplace_back(reg(3, 0.0, 1.0, "y")); in main()
35 auto h = make_histogram(std::move(axes)); in main()
/third_party/boost/boost/histogram/
Dmake_histogram.hpp36 auto make_histogram_with(Storage&& storage, Axis&& axis, Axes&&... axes) { in make_histogram_with() argument
37 auto a = std::make_tuple(std::forward<Axis>(axis), std::forward<Axes>(axes)...); in make_histogram_with()
49 auto make_histogram(Axis&& axis, Axes&&... axes) { in make_histogram() argument
51 std::forward<Axes>(axes)...); in make_histogram()
60 auto make_weighted_histogram(Axis&& axis, Axes&&... axes) { in make_weighted_histogram() argument
62 std::forward<Axes>(axes)...); in make_weighted_histogram()
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/op_declare/
Dreduce_ops_declare.cc58 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
66 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
74 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
82 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
90 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
98 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
106 {2, ATTR_DESC(axes, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};

12345678910