mindspore 2.3.0__cp310-cp310-win_amd64.whl → 2.4.0__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mindspore might be problematic. Click here for more details.
- mindspore/.commit_id +1 -1
- mindspore/Microsoft.VisualStudio.Telemetry.dll +0 -0
- mindspore/Newtonsoft.Json.dll +0 -0
- mindspore/__init__.py +3 -1
- mindspore/_c_dataengine.cp310-win_amd64.pyd +0 -0
- mindspore/_c_expression.cp310-win_amd64.pyd +0 -0
- mindspore/_c_mindrecord.cp310-win_amd64.pyd +0 -0
- mindspore/_checkparam.py +50 -9
- mindspore/_extends/parse/compile_config.py +41 -0
- mindspore/_extends/parse/parser.py +9 -7
- mindspore/_extends/parse/standard_method.py +52 -14
- mindspore/_extends/pijit/pijit_func_white_list.py +350 -24
- mindspore/amp.py +24 -10
- mindspore/atlprov.dll +0 -0
- mindspore/avcodec-59.dll +0 -0
- mindspore/avdevice-59.dll +0 -0
- mindspore/avfilter-8.dll +0 -0
- mindspore/avformat-59.dll +0 -0
- mindspore/avutil-57.dll +0 -0
- mindspore/c1.dll +0 -0
- mindspore/c1xx.dll +0 -0
- mindspore/c2.dll +0 -0
- mindspore/common/__init__.py +6 -4
- mindspore/common/_pijit_context.py +190 -0
- mindspore/common/_register_for_tensor.py +2 -1
- mindspore/common/_tensor_overload.py +139 -0
- mindspore/common/api.py +102 -87
- mindspore/common/dump.py +5 -6
- mindspore/common/generator.py +1 -7
- mindspore/common/hook_handle.py +14 -26
- mindspore/common/mindir_util.py +2 -2
- mindspore/common/parameter.py +46 -13
- mindspore/common/recompute.py +39 -9
- mindspore/common/sparse_tensor.py +7 -3
- mindspore/common/tensor.py +209 -29
- mindspore/communication/__init__.py +1 -1
- mindspore/communication/_comm_helper.py +38 -3
- mindspore/communication/comm_func.py +310 -55
- mindspore/communication/management.py +14 -14
- mindspore/context.py +123 -22
- mindspore/dataset/__init__.py +1 -1
- mindspore/dataset/audio/__init__.py +1 -1
- mindspore/dataset/core/config.py +7 -0
- mindspore/dataset/core/validator_helpers.py +7 -0
- mindspore/dataset/engine/cache_client.py +1 -1
- mindspore/dataset/engine/datasets.py +72 -44
- mindspore/dataset/engine/datasets_audio.py +7 -7
- mindspore/dataset/engine/datasets_standard_format.py +53 -3
- mindspore/dataset/engine/datasets_text.py +20 -20
- mindspore/dataset/engine/datasets_user_defined.py +174 -104
- mindspore/dataset/engine/datasets_vision.py +33 -33
- mindspore/dataset/engine/iterators.py +29 -0
- mindspore/dataset/engine/obs/util.py +7 -0
- mindspore/dataset/engine/queue.py +114 -60
- mindspore/dataset/engine/serializer_deserializer.py +2 -2
- mindspore/dataset/engine/validators.py +34 -14
- mindspore/dataset/text/__init__.py +1 -4
- mindspore/dataset/transforms/__init__.py +0 -3
- mindspore/dataset/utils/line_reader.py +2 -0
- mindspore/dataset/vision/__init__.py +1 -4
- mindspore/dataset/vision/utils.py +1 -1
- mindspore/dataset/vision/validators.py +2 -1
- mindspore/dnnl.dll +0 -0
- mindspore/dpcmi.dll +0 -0
- mindspore/{nn/extend → experimental/es}/__init__.py +4 -11
- mindspore/experimental/es/embedding_service.py +883 -0
- mindspore/{nn/layer → experimental/es}/embedding_service_layer.py +218 -30
- mindspore/experimental/llm_boost/__init__.py +21 -0
- mindspore/{nn/extend/layer → experimental/llm_boost/atb}/__init__.py +4 -8
- mindspore/experimental/llm_boost/atb/boost_base.py +211 -0
- mindspore/experimental/llm_boost/atb/llama_boost.py +115 -0
- mindspore/experimental/llm_boost/atb/qwen_boost.py +101 -0
- mindspore/experimental/llm_boost/register.py +129 -0
- mindspore/experimental/llm_boost/utils.py +31 -0
- mindspore/experimental/optim/adamw.py +85 -0
- mindspore/experimental/optim/optimizer.py +3 -0
- mindspore/hal/__init__.py +3 -3
- mindspore/hal/contiguous_tensors_handle.py +175 -0
- mindspore/hal/stream.py +18 -0
- mindspore/include/api/model_group.h +13 -1
- mindspore/include/api/types.h +10 -10
- mindspore/include/dataset/config.h +2 -2
- mindspore/include/dataset/constants.h +2 -2
- mindspore/include/dataset/execute.h +2 -2
- mindspore/include/dataset/vision.h +4 -0
- mindspore/jpeg62.dll +0 -0
- mindspore/log.py +1 -1
- mindspore/mindrecord/filewriter.py +68 -51
- mindspore/mindspore_backend.dll +0 -0
- mindspore/mindspore_common.dll +0 -0
- mindspore/mindspore_core.dll +0 -0
- mindspore/mindspore_glog.dll +0 -0
- mindspore/mindspore_np_dtype.dll +0 -0
- mindspore/mindspore_ops.dll +0 -0
- mindspore/mint/__init__.py +495 -46
- mindspore/mint/distributed/__init__.py +31 -0
- mindspore/mint/distributed/distributed.py +254 -0
- mindspore/mint/nn/__init__.py +266 -21
- mindspore/mint/nn/functional.py +125 -19
- mindspore/mint/nn/layer/__init__.py +39 -0
- mindspore/mint/nn/layer/activation.py +133 -0
- mindspore/mint/nn/layer/normalization.py +477 -0
- mindspore/mint/nn/layer/pooling.py +110 -0
- mindspore/mint/optim/adamw.py +28 -7
- mindspore/mint/special/__init__.py +63 -0
- mindspore/msobj140.dll +0 -0
- mindspore/mspdb140.dll +0 -0
- mindspore/mspdbcore.dll +0 -0
- mindspore/mspdbst.dll +0 -0
- mindspore/mspft140.dll +0 -0
- mindspore/msvcdis140.dll +0 -0
- mindspore/msvcp140_1.dll +0 -0
- mindspore/msvcp140_2.dll +0 -0
- mindspore/msvcp140_atomic_wait.dll +0 -0
- mindspore/msvcp140_codecvt_ids.dll +0 -0
- mindspore/multiprocessing/__init__.py +2 -1
- mindspore/nn/__init__.py +0 -1
- mindspore/nn/cell.py +275 -93
- mindspore/nn/layer/activation.py +211 -44
- mindspore/nn/layer/basic.py +113 -3
- mindspore/nn/layer/embedding.py +120 -2
- mindspore/nn/layer/normalization.py +101 -5
- mindspore/nn/layer/padding.py +34 -48
- mindspore/nn/layer/pooling.py +161 -7
- mindspore/nn/layer/transformer.py +3 -3
- mindspore/nn/loss/__init__.py +2 -2
- mindspore/nn/loss/loss.py +84 -6
- mindspore/nn/optim/__init__.py +2 -1
- mindspore/nn/optim/adadelta.py +1 -1
- mindspore/nn/optim/adam.py +1 -1
- mindspore/nn/optim/lamb.py +1 -1
- mindspore/nn/optim/tft_wrapper.py +127 -0
- mindspore/nn/wrap/cell_wrapper.py +12 -23
- mindspore/nn/wrap/grad_reducer.py +5 -5
- mindspore/nn/wrap/loss_scale.py +17 -3
- mindspore/numpy/__init__.py +1 -1
- mindspore/numpy/array_creations.py +65 -68
- mindspore/numpy/array_ops.py +64 -60
- mindspore/numpy/fft.py +610 -75
- mindspore/numpy/logic_ops.py +11 -10
- mindspore/numpy/math_ops.py +85 -84
- mindspore/numpy/utils_const.py +4 -4
- mindspore/opencv_core452.dll +0 -0
- mindspore/opencv_imgcodecs452.dll +0 -0
- mindspore/opencv_imgproc452.dll +0 -0
- mindspore/ops/__init__.py +6 -4
- mindspore/ops/_grad_experimental/grad_comm_ops.py +47 -3
- mindspore/ops/_grad_experimental/grad_math_ops.py +0 -22
- mindspore/ops/_vmap/vmap_array_ops.py +2 -4
- mindspore/ops/_vmap/vmap_math_ops.py +17 -1
- mindspore/ops/_vmap/vmap_nn_ops.py +43 -2
- mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +85 -7
- mindspore/ops/auto_generate/gen_arg_dtype_cast.py +2 -0
- mindspore/ops/auto_generate/gen_extend_func.py +734 -13
- mindspore/ops/auto_generate/gen_ops_def.py +2420 -381
- mindspore/ops/auto_generate/gen_ops_prim.py +5196 -1659
- mindspore/ops/auto_generate/pyboost_inner_prim.py +176 -56
- mindspore/ops/composite/base.py +85 -48
- mindspore/ops/composite/multitype_ops/_compile_utils.py +1 -0
- mindspore/ops/composite/multitype_ops/not_in_impl.py +2 -2
- mindspore/ops/function/__init__.py +22 -0
- mindspore/ops/function/array_func.py +490 -153
- mindspore/ops/function/debug_func.py +113 -1
- mindspore/ops/function/fft_func.py +15 -2
- mindspore/ops/function/grad/grad_func.py +3 -2
- mindspore/ops/function/math_func.py +558 -207
- mindspore/ops/function/nn_func.py +817 -383
- mindspore/ops/function/other_func.py +3 -2
- mindspore/ops/function/random_func.py +184 -8
- mindspore/ops/function/reshard_func.py +13 -11
- mindspore/ops/function/sparse_unary_func.py +1 -1
- mindspore/ops/function/vmap_func.py +3 -2
- mindspore/ops/functional.py +24 -14
- mindspore/ops/op_info_register.py +3 -3
- mindspore/ops/operations/__init__.py +6 -1
- mindspore/ops/operations/_grad_ops.py +2 -76
- mindspore/ops/operations/_infer_ops.py +1 -1
- mindspore/ops/operations/_inner_ops.py +71 -94
- mindspore/ops/operations/array_ops.py +12 -146
- mindspore/ops/operations/comm_ops.py +42 -53
- mindspore/ops/operations/custom_ops.py +83 -19
- mindspore/ops/operations/debug_ops.py +42 -10
- mindspore/ops/operations/manually_defined/_inner.py +12 -0
- mindspore/ops/operations/manually_defined/ops_def.py +265 -10
- mindspore/ops/operations/math_ops.py +12 -223
- mindspore/ops/operations/nn_ops.py +20 -114
- mindspore/ops/operations/other_ops.py +7 -4
- mindspore/ops/operations/random_ops.py +46 -1
- mindspore/ops/primitive.py +18 -6
- mindspore/ops_generate/arg_dtype_cast.py +2 -0
- mindspore/ops_generate/gen_aclnn_implement.py +11 -11
- mindspore/ops_generate/gen_constants.py +36 -0
- mindspore/ops_generate/gen_ops.py +67 -52
- mindspore/ops_generate/gen_ops_inner_prim.py +1 -1
- mindspore/ops_generate/gen_pyboost_func.py +131 -47
- mindspore/ops_generate/op_proto.py +10 -3
- mindspore/ops_generate/pyboost_utils.py +14 -1
- mindspore/ops_generate/template.py +43 -21
- mindspore/parallel/__init__.py +3 -1
- mindspore/parallel/_auto_parallel_context.py +28 -8
- mindspore/parallel/_cell_wrapper.py +83 -0
- mindspore/parallel/_parallel_serialization.py +47 -19
- mindspore/parallel/_tensor.py +81 -11
- mindspore/parallel/_utils.py +13 -1
- mindspore/parallel/algo_parameter_config.py +5 -5
- mindspore/parallel/checkpoint_transform.py +46 -39
- mindspore/parallel/cluster/process_entity/__init__.py +1 -1
- mindspore/parallel/cluster/process_entity/_api.py +31 -23
- mindspore/parallel/cluster/process_entity/_utils.py +2 -27
- mindspore/parallel/parameter_broadcast.py +3 -4
- mindspore/parallel/shard.py +162 -31
- mindspore/parallel/transform_safetensors.py +993 -0
- mindspore/pgodb140.dll +0 -0
- mindspore/pgort140.dll +0 -0
- mindspore/profiler/__init__.py +2 -1
- mindspore/profiler/common/constant.py +29 -0
- mindspore/profiler/common/registry.py +47 -0
- mindspore/profiler/common/util.py +28 -0
- mindspore/profiler/dynamic_profiler.py +694 -0
- mindspore/profiler/envprofiling.py +17 -19
- mindspore/profiler/parser/ascend_analysis/constant.py +18 -0
- mindspore/profiler/parser/ascend_analysis/file_manager.py +25 -4
- mindspore/profiler/parser/ascend_analysis/function_event.py +43 -19
- mindspore/profiler/parser/ascend_analysis/fwk_cann_parser.py +31 -26
- mindspore/profiler/parser/ascend_analysis/fwk_file_parser.py +56 -10
- mindspore/profiler/parser/ascend_analysis/msprof_timeline_parser.py +55 -8
- mindspore/profiler/parser/ascend_analysis/path_manager.py +313 -0
- mindspore/profiler/parser/ascend_analysis/profiler_info_parser.py +27 -20
- mindspore/profiler/parser/ascend_analysis/trace_event_manager.py +9 -2
- mindspore/profiler/parser/ascend_msprof_exporter.py +5 -4
- mindspore/profiler/parser/ascend_timeline_generator.py +27 -25
- mindspore/profiler/parser/base_timeline_generator.py +19 -25
- mindspore/profiler/parser/cpu_gpu_timeline_generator.py +25 -12
- mindspore/profiler/parser/framework_parser.py +1 -391
- mindspore/profiler/parser/gpu_analysis/__init__.py +14 -0
- mindspore/profiler/parser/gpu_analysis/function_event.py +44 -0
- mindspore/profiler/parser/gpu_analysis/fwk_file_parser.py +89 -0
- mindspore/profiler/parser/gpu_analysis/profiler_info_parser.py +72 -0
- mindspore/profiler/parser/memory_usage_parser.py +0 -154
- mindspore/profiler/parser/profiler_info.py +78 -6
- mindspore/profiler/profiler.py +153 -0
- mindspore/profiler/profiling.py +280 -412
- mindspore/rewrite/__init__.py +1 -2
- mindspore/rewrite/common/namespace.py +4 -4
- mindspore/rewrite/symbol_tree/symbol_tree.py +3 -3
- mindspore/run_check/_check_version.py +36 -103
- mindspore/safeguard/rewrite_obfuscation.py +591 -247
- mindspore/swresample-4.dll +0 -0
- mindspore/swscale-6.dll +0 -0
- mindspore/tbbmalloc.dll +0 -0
- mindspore/tinyxml2.dll +0 -0
- mindspore/train/__init__.py +4 -3
- mindspore/train/_utils.py +28 -2
- mindspore/train/amp.py +171 -53
- mindspore/train/callback/__init__.py +2 -2
- mindspore/train/callback/_callback.py +4 -4
- mindspore/train/callback/_checkpoint.py +85 -22
- mindspore/train/callback/_cluster_monitor.py +1 -1
- mindspore/train/callback/_flops_collector.py +1 -0
- mindspore/train/callback/_loss_monitor.py +3 -3
- mindspore/train/callback/_on_request_exit.py +134 -31
- mindspore/train/callback/_summary_collector.py +5 -5
- mindspore/train/callback/_tft_register.py +352 -0
- mindspore/train/dataset_helper.py +7 -3
- mindspore/train/metrics/metric.py +3 -3
- mindspore/train/metrics/roc.py +4 -4
- mindspore/train/mind_ir_pb2.py +44 -39
- mindspore/train/model.py +134 -58
- mindspore/train/serialization.py +336 -112
- mindspore/turbojpeg.dll +0 -0
- mindspore/utils/__init__.py +21 -0
- mindspore/utils/utils.py +60 -0
- mindspore/vcmeta.dll +0 -0
- mindspore/vcruntime140.dll +0 -0
- mindspore/vcruntime140_1.dll +0 -0
- mindspore/version.py +1 -1
- {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/METADATA +6 -2
- {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/RECORD +281 -275
- mindspore/include/c_api/ms/abstract.h +0 -67
- mindspore/include/c_api/ms/attribute.h +0 -197
- mindspore/include/c_api/ms/base/handle_types.h +0 -43
- mindspore/include/c_api/ms/base/macros.h +0 -32
- mindspore/include/c_api/ms/base/status.h +0 -33
- mindspore/include/c_api/ms/base/types.h +0 -283
- mindspore/include/c_api/ms/context.h +0 -102
- mindspore/include/c_api/ms/graph.h +0 -160
- mindspore/include/c_api/ms/node.h +0 -606
- mindspore/include/c_api/ms/tensor.h +0 -161
- mindspore/include/c_api/ms/value.h +0 -84
- mindspore/mindspore_shared_lib.dll +0 -0
- mindspore/nn/extend/basic.py +0 -140
- mindspore/nn/extend/embedding.py +0 -143
- mindspore/nn/extend/layer/normalization.py +0 -109
- mindspore/nn/extend/pooling.py +0 -117
- mindspore/nn/layer/embedding_service.py +0 -531
- mindspore/ops/_op_impl/aicpu/strided_slice_v2.py +0 -93
- mindspore/ops/_op_impl/aicpu/strided_slice_v2_grad.py +0 -66
- mindspore/ops/extend/__init__.py +0 -53
- mindspore/ops/extend/array_func.py +0 -218
- mindspore/ops/extend/math_func.py +0 -76
- mindspore/ops/extend/nn_func.py +0 -308
- mindspore/ops/silent_check.py +0 -162
- mindspore/profiler/parser/msadvisor_analyzer.py +0 -82
- mindspore/profiler/parser/msadvisor_parser.py +0 -240
- mindspore/train/callback/_mindio_ttp.py +0 -443
- {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/WHEEL +0 -0
- {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/entry_points.txt +0 -0
- {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/top_level.txt +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_INCLUDE_ABSTRACT_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_INCLUDE_ABSTRACT_H_
|
|
19
|
-
|
|
20
|
-
#include <stdlib.h>
|
|
21
|
-
#include "include/c_api/ms/base/macros.h"
|
|
22
|
-
#include "include/c_api/ms/base/types.h"
|
|
23
|
-
#include "include/c_api/ms/base/handle_types.h"
|
|
24
|
-
#include "include/c_api/ms/base/status.h"
|
|
25
|
-
#include "include/c_api/ms/context.h"
|
|
26
|
-
|
|
27
|
-
#ifdef __cplusplus
|
|
28
|
-
extern "C" {
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
/// \brief Assign Abstract from the input node to the current node.
|
|
32
|
-
///
|
|
33
|
-
/// \param[in] res_mgr Resource manager that saves allocated instance resources.
|
|
34
|
-
/// \param[in] cur_node The current node.
|
|
35
|
-
/// \param[in] input_node The input node which contains the Abstract.
|
|
36
|
-
///
|
|
37
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
38
|
-
MIND_C_API STATUS MSAssignAbstract(ResMgrHandle res_mgr, NodeHandle cur_node, ConstNodeHandle input_node);
|
|
39
|
-
|
|
40
|
-
/// \brief Set Abstract to the node with type and shape.
|
|
41
|
-
///
|
|
42
|
-
/// \param[in] res_mgr Resource manager that saves allocated instance resources.
|
|
43
|
-
/// \param[in] node The target node.
|
|
44
|
-
/// \param[in] type The output type of the node.
|
|
45
|
-
/// \param[in] shape The shape array which describe the output shape of node.
|
|
46
|
-
/// \param[in] shape_size The size of the shape array, i.e., the dimension of node output.
|
|
47
|
-
///
|
|
48
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
49
|
-
MIND_C_API STATUS MSSetAbstract(ResMgrHandle res_mgr, NodeHandle node, DataTypeC type, const int64_t shape[],
|
|
50
|
-
size_t shape_size);
|
|
51
|
-
|
|
52
|
-
/// \brief Get multiple Abstract to the node. Usually used in the case that the node has multiple outputs.
|
|
53
|
-
///
|
|
54
|
-
/// \param[in] res_mgr Resource manager that saves allocated instance resources.
|
|
55
|
-
/// \param[in] node The target node.
|
|
56
|
-
/// \param[in] type The output type of the node.
|
|
57
|
-
/// \param[in] shapes A 2D array which contains multiple shape arrays response to node's multiple outputs.
|
|
58
|
-
/// \param[in] shape_sizes The array contains the size of all shape, i.e., the dimension of all node output.
|
|
59
|
-
///
|
|
60
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
61
|
-
MIND_C_API STATUS MSSetMultiAbstract(ResMgrHandle res_mgr, NodeHandle node, DataTypeC type, const int64_t **shapes,
|
|
62
|
-
const size_t shape_sizes[], size_t abs_num);
|
|
63
|
-
|
|
64
|
-
#ifdef __cplusplus
|
|
65
|
-
}
|
|
66
|
-
#endif
|
|
67
|
-
#endif // MINDSPORE_CCSRC_C_API_INCLUDE_ABSTRACT_H_
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_INCLUDE_ATTRIBUTE_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_INCLUDE_ATTRIBUTE_H_
|
|
19
|
-
|
|
20
|
-
#include <stdbool.h>
|
|
21
|
-
#include <stdlib.h>
|
|
22
|
-
#include "include/c_api/ms/base/macros.h"
|
|
23
|
-
#include "include/c_api/ms/base/handle_types.h"
|
|
24
|
-
#include "include/c_api/ms/base/types.h"
|
|
25
|
-
#include "include/c_api/ms/base/status.h"
|
|
26
|
-
#include "include/c_api/ms/context.h"
|
|
27
|
-
|
|
28
|
-
#ifdef __cplusplus
|
|
29
|
-
extern "C" {
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
|
-
/// \brief Create a tensor with input data buffer.
|
|
33
|
-
///
|
|
34
|
-
/// \param[in] op The Operator node handle.
|
|
35
|
-
/// \param[in] attr_name The attribute name.
|
|
36
|
-
/// \param[in] value The attribute value.
|
|
37
|
-
///
|
|
38
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
39
|
-
MIND_C_API STATUS MSOpSetScalarAttrFloat32(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, float value);
|
|
40
|
-
|
|
41
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
42
|
-
///
|
|
43
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
44
|
-
/// \param[in] op Target node.
|
|
45
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
46
|
-
/// \param[in] value The input value of the attribute.
|
|
47
|
-
///
|
|
48
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
49
|
-
MIND_C_API STATUS MSOpSetScalarAttrBool(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, bool value);
|
|
50
|
-
|
|
51
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
52
|
-
///
|
|
53
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
54
|
-
/// \param[in] op Target node.
|
|
55
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
56
|
-
/// \param[in] value The input value of the attribute.
|
|
57
|
-
///
|
|
58
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
59
|
-
MIND_C_API STATUS MSOpSetScalarAttrInt32(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, int32_t value);
|
|
60
|
-
|
|
61
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
62
|
-
///
|
|
63
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
64
|
-
/// \param[in] op Target node.
|
|
65
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
66
|
-
/// \param[in] value The input value of the attribute.
|
|
67
|
-
///
|
|
68
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
69
|
-
MIND_C_API STATUS MSOpSetScalarAttrInt64(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, int64_t value);
|
|
70
|
-
|
|
71
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
72
|
-
///
|
|
73
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
74
|
-
/// \param[in] op Target node.
|
|
75
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
76
|
-
/// \param[in] value The input value of the attribute.
|
|
77
|
-
///
|
|
78
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
79
|
-
MIND_C_API STATUS MSOpSetAttrType(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, DataTypeC value);
|
|
80
|
-
|
|
81
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
82
|
-
///
|
|
83
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
84
|
-
/// \param[in] op Target node.
|
|
85
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
86
|
-
/// \param[in] value The input value array of the attribute.
|
|
87
|
-
/// \param[in] vec_size number of elements in the array.
|
|
88
|
-
///
|
|
89
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
90
|
-
MIND_C_API STATUS MSOpSetAttrTypeArray(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, DataTypeC value[],
|
|
91
|
-
size_t vec_size);
|
|
92
|
-
|
|
93
|
-
/// \brief Set the attribute of the target node with the given name and value.
|
|
94
|
-
///
|
|
95
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
96
|
-
/// \param[in] op Target node.
|
|
97
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
98
|
-
/// \param[in] value The input value array of the attribute.
|
|
99
|
-
/// \param[in] vec_size number of elements in the array.
|
|
100
|
-
/// \param[in] data_type Data type id. Currently support kNumberTypeInt32, kNumberTypeInt64, kNumberTypeFloat32,
|
|
101
|
-
/// kNumberTypeBool.
|
|
102
|
-
///
|
|
103
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
104
|
-
MIND_C_API STATUS MSOpSetAttrArray(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, void *value,
|
|
105
|
-
size_t vec_size, DataTypeC data_type);
|
|
106
|
-
|
|
107
|
-
/// \brief Set the attribute of the target node with the given name and value as ValueList.
|
|
108
|
-
///
|
|
109
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
110
|
-
/// \param[in] op Target node.
|
|
111
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
112
|
-
/// \param[in] value The input value array of the attribute.
|
|
113
|
-
/// \param[in] vec_size Number of elements in the array.
|
|
114
|
-
///
|
|
115
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
116
|
-
MIND_C_API STATUS MSOpSetAttrStringArray(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name,
|
|
117
|
-
const char *value[], size_t vec_size);
|
|
118
|
-
|
|
119
|
-
/// \brief Set the attribute of the target node with the given name and string value.
|
|
120
|
-
///
|
|
121
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
122
|
-
/// \param[in] op Target node.
|
|
123
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
124
|
-
/// \param[in] value The input value array of the attribute.
|
|
125
|
-
///
|
|
126
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
127
|
-
MIND_C_API STATUS MSOpSetAttrString(ResMgrHandle res_mgr, NodeHandle op, const char *attr_name, const char *value);
|
|
128
|
-
|
|
129
|
-
/// \brief Get the attribute of the target node with the given attribute name.
|
|
130
|
-
///
|
|
131
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
132
|
-
/// \param[in] op Target Node.
|
|
133
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
134
|
-
/// \param[in] error Error code indicates whether the function executed successfully.
|
|
135
|
-
///
|
|
136
|
-
/// \return Attribute value
|
|
137
|
-
MIND_C_API int64_t MSOpGetScalarAttrInt64(ResMgrHandle res_mgr, ConstNodeHandle op, const char *attr_name,
|
|
138
|
-
STATUS *error);
|
|
139
|
-
|
|
140
|
-
/// \brief Get the attribute of the target node with the given attribute name.
|
|
141
|
-
///
|
|
142
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
143
|
-
/// \param[in] op Target Node.
|
|
144
|
-
/// \param[in] attr_name The attribute name associates with the node.
|
|
145
|
-
/// \param[in] values Array for storing the Atrrubute value.
|
|
146
|
-
/// \param[in] value_num Size of the given array.
|
|
147
|
-
///
|
|
148
|
-
/// \return Error code indicates whether the function executed successfully.
|
|
149
|
-
MIND_C_API STATUS MSOpGetAttrArrayInt64(ResMgrHandle res_mgr, ConstNodeHandle op, const char *attr_name,
|
|
150
|
-
int64_t values[], size_t value_num);
|
|
151
|
-
|
|
152
|
-
/// \brief Create new Int64 attribute scalar value.
|
|
153
|
-
///
|
|
154
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
155
|
-
/// \param[in] v Given value.
|
|
156
|
-
///
|
|
157
|
-
/// \return Attribute value handle.
|
|
158
|
-
MIND_C_API AttrHandle MSNewAttrInt64(ResMgrHandle res_mgr, const int64_t v);
|
|
159
|
-
|
|
160
|
-
/// \brief Create new float32 attribute scalar value.
|
|
161
|
-
///
|
|
162
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
163
|
-
/// \param[in] v Given value.
|
|
164
|
-
///
|
|
165
|
-
/// \return Attribute value handle.
|
|
166
|
-
MIND_C_API AttrHandle MSNewAttrFloat32(ResMgrHandle res_mgr, const float v);
|
|
167
|
-
|
|
168
|
-
/// \brief Create new Bool attribute scalar value.
|
|
169
|
-
///
|
|
170
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
171
|
-
/// \param[in] v Given value.
|
|
172
|
-
///
|
|
173
|
-
/// \return Attribute value handle.
|
|
174
|
-
MIND_C_API AttrHandle MSNewAttrBool(ResMgrHandle res_mgr, const bool v);
|
|
175
|
-
|
|
176
|
-
/// \brief Create new vector of Strings attribute value.
|
|
177
|
-
///
|
|
178
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
179
|
-
/// \param[in] strs Given value.
|
|
180
|
-
/// \param[in] vec_len Length of the string vector.
|
|
181
|
-
///
|
|
182
|
-
/// \return Attribute value handle.
|
|
183
|
-
MIND_C_API AttrHandle MSNewAttrStrings(ResMgrHandle res_mgr, const char *strs[], size_t vec_len);
|
|
184
|
-
|
|
185
|
-
/// \brief Create new attribute value with array.
|
|
186
|
-
///
|
|
187
|
-
/// \param[in] res_mgr Resource Handle that manages the nodes of the funcGraph.
|
|
188
|
-
/// \param[in] value Given array.
|
|
189
|
-
/// \param[in] vec_size Given array size.
|
|
190
|
-
/// \param[in] data_type Datatype of the array.
|
|
191
|
-
///
|
|
192
|
-
/// \return Attribute value handle
|
|
193
|
-
MIND_C_API AttrHandle MSNewAttrArray(ResMgrHandle res_mgr, void *value, size_t vec_size, DataTypeC data_type);
|
|
194
|
-
#ifdef __cplusplus
|
|
195
|
-
}
|
|
196
|
-
#endif
|
|
197
|
-
#endif // MINDSPORE_CCSRC_C_API_INCLUDE_ATTRIBUTE_H_
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_BASE_HANDLE_TYPES_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_BASE_HANDLE_TYPES_H_
|
|
19
|
-
|
|
20
|
-
#ifdef __cplusplus
|
|
21
|
-
extern "C" {
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
|
-
typedef void *Handle;
|
|
25
|
-
typedef void *TensorHandle;
|
|
26
|
-
typedef void *NodeHandle;
|
|
27
|
-
typedef void *ValueHandle;
|
|
28
|
-
typedef void *GraphHandle;
|
|
29
|
-
typedef void *FuncGraphMgrHandle;
|
|
30
|
-
typedef void *ResMgrHandle;
|
|
31
|
-
|
|
32
|
-
typedef const void *ConstHandle;
|
|
33
|
-
typedef const void *ConstTensorHandle;
|
|
34
|
-
typedef const void *ConstNodeHandle;
|
|
35
|
-
typedef const void *ConstValueHandle;
|
|
36
|
-
typedef const void *ConstGraphHandle;
|
|
37
|
-
typedef const void *ConstFuncGraphMgrHandle;
|
|
38
|
-
typedef const void *ConstResMgrHandle;
|
|
39
|
-
|
|
40
|
-
#ifdef __cplusplus
|
|
41
|
-
}
|
|
42
|
-
#endif
|
|
43
|
-
#endif // MINDSPORE_CCSRC_C_API_BASE_HANDLE_TYPES_H_
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_BASE_MACROS_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_BASE_MACROS_H_
|
|
19
|
-
|
|
20
|
-
#if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__))
|
|
21
|
-
#ifdef BUILDING_C_API_DLL
|
|
22
|
-
#define MIND_C_API __declspec(dllexport)
|
|
23
|
-
#else
|
|
24
|
-
#define MIND_C_API __declspec(dllimport)
|
|
25
|
-
#endif
|
|
26
|
-
#else
|
|
27
|
-
#define MIND_C_API __attribute__((visibility("default")))
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
#define MAX_DIMS 8
|
|
31
|
-
|
|
32
|
-
#endif // MINDSPORE_CCSRC_C_API_BASE_MACROS_H_
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_BASE_STATUS_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_BASE_STATUS_H_
|
|
19
|
-
|
|
20
|
-
#ifdef __cplusplus
|
|
21
|
-
extern "C" {
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
|
-
typedef enum STATUS {
|
|
25
|
-
RET_OK = 0, /* No error */
|
|
26
|
-
RET_ERROR = -1, /* Normal error */
|
|
27
|
-
RET_NULL_PTR = -2, /* Nullptr error */
|
|
28
|
-
} STATUS;
|
|
29
|
-
|
|
30
|
-
#ifdef __cplusplus
|
|
31
|
-
}
|
|
32
|
-
#endif
|
|
33
|
-
#endif // MINDSPORE_CCSRC_C_API_BASE_STATUS_H_
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2022 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MINDSPORE_CCSRC_C_API_BASE_TYPES_H_
|
|
18
|
-
#define MINDSPORE_CCSRC_C_API_BASE_TYPES_H_
|
|
19
|
-
|
|
20
|
-
#include <stdint.h>
|
|
21
|
-
|
|
22
|
-
#ifdef __cplusplus
|
|
23
|
-
extern "C" {
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
typedef enum DataTypeC {
|
|
27
|
-
MS_NONE = 0,
|
|
28
|
-
MS_TYPE = 1,
|
|
29
|
-
MS_STRING = 12,
|
|
30
|
-
MS_BOOL = 30,
|
|
31
|
-
MS_INT8 = 32,
|
|
32
|
-
MS_INT16 = 33,
|
|
33
|
-
MS_INT32 = 34,
|
|
34
|
-
MS_INT64 = 35,
|
|
35
|
-
MS_UINT8 = 37,
|
|
36
|
-
MS_UINT16 = 38,
|
|
37
|
-
MS_UINT32 = 39,
|
|
38
|
-
MS_UINT64 = 40,
|
|
39
|
-
MS_FLOAT16 = 42,
|
|
40
|
-
MS_FLOAT32 = 43,
|
|
41
|
-
MS_FLOAT64 = 44,
|
|
42
|
-
MS_COMPLEX64 = 46,
|
|
43
|
-
MS_COMPLEX128 = 47,
|
|
44
|
-
MS_INVALID_TYPE = INT32_MAX,
|
|
45
|
-
} DataTypeC;
|
|
46
|
-
|
|
47
|
-
typedef enum DTypeFormat {
|
|
48
|
-
None_None, // {"", ""};
|
|
49
|
-
None_Default, // {"", "DefaultFormat"};
|
|
50
|
-
|
|
51
|
-
BOOL_None, // {"bool", ""};
|
|
52
|
-
BOOL_Default, // {"bool", "DefaultFormat"};
|
|
53
|
-
BOOL_5HD, // {"bool", "NC1HWC0"};
|
|
54
|
-
BOOL_FracZ, // {"bool", "FRACTAL_Z"};
|
|
55
|
-
BOOL_FracNZ, // {"bool", "FRACTAL_NZ"};
|
|
56
|
-
BOOL_C1HWNCoC0, // {"bool", "C1HWNCoC0"};
|
|
57
|
-
BOOL_NCHW, // {"bool", "NCHW"};
|
|
58
|
-
BOOL_NHWC, // {"bool", "NHWC"};
|
|
59
|
-
BOOL_HWCN, // {"bool", "HWCN"};
|
|
60
|
-
BOOL_NDHWC, // {"bool", "NDHWC"};
|
|
61
|
-
BOOL_ChannelLast, // {"bool", "ChannelLast"};
|
|
62
|
-
BOOL_Default_Tuple, // {"bool", "DefaultFormat", "tuple"};
|
|
63
|
-
BOOL_Default_List, // {"bool", "DefaultFormat", "list"};
|
|
64
|
-
|
|
65
|
-
I8_None, // {"int8", ""};
|
|
66
|
-
I8_Default, // {"int8", "DefaultFormat"};
|
|
67
|
-
I8_5HD, // {"int8", "NC1HWC0"};
|
|
68
|
-
I8_FracZ, // {"int8", "FRACTAL_Z"};
|
|
69
|
-
I8_FracNZ, // {"int8", "FRACTAL_NZ"};
|
|
70
|
-
I8_C1HWNCoC0, // {"int8", "C1HWNCoC0"};
|
|
71
|
-
I8_NCHW, // {"int8", "NCHW"};
|
|
72
|
-
I8_NHWC, // {"int8", "NHWC"};
|
|
73
|
-
I8_HWCN, // {"int8", "HWCN"};
|
|
74
|
-
I8_NDHWC, // {"int8", "NDHWC"};
|
|
75
|
-
I8_NCDHW, // {"int8", "NCDHW"};
|
|
76
|
-
I8_ChannelLast, // {"int8", "ChannelLast"};
|
|
77
|
-
I8_NDC1HWC0, // {"int8", "NDC1HWC0"};
|
|
78
|
-
I8_NC1HWC0, // {"int8", "NC1HWC0"};
|
|
79
|
-
I8_Default_Tuple, // {"int8", "DefaultFormat", "tuple"};
|
|
80
|
-
I8_Default_List, // {"int8", "DefaultFormat", "list"};
|
|
81
|
-
|
|
82
|
-
U8_None, // {"uint8", ""};
|
|
83
|
-
U8_Default, // {"uint8", "DefaultFormat"};
|
|
84
|
-
U8_5HD, // {"uint8", "NC1HWC0"};
|
|
85
|
-
U8_FracZ, // {"uint8", "FRACTAL_Z"};
|
|
86
|
-
U8_FracNZ, // {"uint8", "FRACTAL_NZ"};
|
|
87
|
-
U8_C1HWNCoC0, // {"uint8", "C1HWNCoC0"};
|
|
88
|
-
U8_NCHW, // {"uint8", "NCHW"};
|
|
89
|
-
U8_NHWC, // {"uint8", "NHWC"};
|
|
90
|
-
U8_HWCN, // {"uint8", "HWCN"};
|
|
91
|
-
U8_NDHWC, // {"uint8", "NDHWC"};
|
|
92
|
-
U8_NCDHW, // {"uint8", "NCDHW"};
|
|
93
|
-
U8_ChannelLast, // {"uint8", "ChannelLast"};
|
|
94
|
-
U8_NDC1HWC0, // {"uint8", "NDC1HWC0"};
|
|
95
|
-
U8_NC1HWC0, // {"uint8", "NC1HWC0"};
|
|
96
|
-
U8_Default_Tuple, // {"uint8", "DefaultFormat", "tuple"};
|
|
97
|
-
U8_Default_List, // {"uint8", "DefaultFormat", "list"};
|
|
98
|
-
|
|
99
|
-
I16_None, // {"int16", ""};
|
|
100
|
-
I16_Default, // {"int16", "DefaultFormat"};
|
|
101
|
-
I16_5HD, // {"int16", "NC1HWC0"};
|
|
102
|
-
I16_FracZ, // {"int16", "FRACTAL_Z"};
|
|
103
|
-
I16_FracNZ, // {"int16", "FRACTAL_NZ"};
|
|
104
|
-
I16_C1HWNCoC0, // {"int16", "C1HWNCoC0"};
|
|
105
|
-
I16_NCHW, // {"int16", "NCHW"};
|
|
106
|
-
I16_NHWC, // {"int16", "NHWC"};
|
|
107
|
-
I16_HWCN, // {"int16", "HWCN"};
|
|
108
|
-
I16_NDHWC, // {"int16", "NDHWC"};
|
|
109
|
-
I16_ChannelLast, // {"int16", "ChannelLast"};
|
|
110
|
-
I16_Default_Tuple, // {"int16", "DefaultFormat", "tuple"};
|
|
111
|
-
I16_Default_List, // {"int16", "DefaultFormat", "list"};
|
|
112
|
-
|
|
113
|
-
U16_None, // {"uint16", ""};
|
|
114
|
-
U16_Default, // {"uint16", "DefaultFormat"};
|
|
115
|
-
U16_5HD, // {"uint16", "NC1HWC0"};
|
|
116
|
-
U16_FracZ, // {"uint16", "FRACTAL_Z"};
|
|
117
|
-
U16_FracNZ, // {"uint16", "FRACTAL_NZ"};
|
|
118
|
-
U16_C1HWNCoC0, // {"uint16", "C1HWNCoC0"};
|
|
119
|
-
U16_NCHW, // {"uint16", "NCHW"};
|
|
120
|
-
U16_NHWC, // {"uint16", "NHWC"};
|
|
121
|
-
U16_HWCN, // {"uint16", "HWCN"};
|
|
122
|
-
U16_NDHWC, // {"uint16", "NDHWC"};
|
|
123
|
-
U16_ChannelLast, // {"uint16", "ChannelLast"};
|
|
124
|
-
U16_Default_Tuple, // {"uint16", "DefaultFormat", "tuple"};
|
|
125
|
-
U16_Default_List, // {"uint16", "DefaultFormat", "list"};
|
|
126
|
-
|
|
127
|
-
I32_None, // {"int32", ""};
|
|
128
|
-
I32_Default, // {"int32", "DefaultFormat"};
|
|
129
|
-
I32_5HD, // {"int32", "NC1HWC0"};
|
|
130
|
-
I32_FracZ, // {"int32", "FRACTAL_Z"};
|
|
131
|
-
I32_FracNZ, // {"int32", "FRACTAL_NZ"};
|
|
132
|
-
I32_C1HWNCoC0, // {"int32", "C1HWNCoC0"};
|
|
133
|
-
I32_NCHW, // {"int32", "NCHW"};
|
|
134
|
-
I32_NHWC, // {"int32", "NHWC"};
|
|
135
|
-
I32_HWCN, // {"int32", "HWCN"};
|
|
136
|
-
I32_NDHWC, // {"int32", "NDHWC"};
|
|
137
|
-
I32_NDC1HWC0, // {"int32", "NDC1HWC0"};
|
|
138
|
-
I32_NCDHW, // {"int32", "NCDHW"};
|
|
139
|
-
I32_ChannelLast, // {"int32", "ChannelLast"};
|
|
140
|
-
I32_Default_Tuple, // {"int32", "DefaultFormat", "tuple"};
|
|
141
|
-
I32_Default_List, // {"int32", "DefaultFormat", "list"};
|
|
142
|
-
|
|
143
|
-
U32_None, // {"uint32", ""};
|
|
144
|
-
U32_Default, // {"uint32", "DefaultFormat"};
|
|
145
|
-
U32_5HD, // {"uint32", "NC1HWC0"};
|
|
146
|
-
U32_FracZ, // {"uint32", "FRACTAL_Z"};
|
|
147
|
-
U32_FracNZ, // {"uint32", "FRACTAL_NZ"};
|
|
148
|
-
U32_C1HWNCoC0, // {"uint32", "C1HWNCoC0"};
|
|
149
|
-
U32_NCHW, // {"uint32", "NCHW"};
|
|
150
|
-
U32_NHWC, // {"uint32", "NHWC"};
|
|
151
|
-
U32_HWCN, // {"uint32", "HWCN"};
|
|
152
|
-
U32_NDHWC, // {"uint32", "NDHWC"};
|
|
153
|
-
U32_ChannelLast, // {"uint32", "ChannelLast"};
|
|
154
|
-
U32_Default_Tuple, // {"uint32", "DefaultFormat", "tuple"};
|
|
155
|
-
U32_Default_List, // {"uint32", "DefaultFormat", "list"};
|
|
156
|
-
|
|
157
|
-
I64_None, // {"int64", ""};
|
|
158
|
-
I64_Default, // {"int64", "DefaultFormat"};
|
|
159
|
-
I64_5HD, // {"int64", "NC1HWC0"};
|
|
160
|
-
I64_FracZ, // {"int64", "FRACTAL_Z"};
|
|
161
|
-
I64_FracNZ, // {"int64", "FRACTAL_NZ"};
|
|
162
|
-
I64_C1HWNCoC0, // {"int64", "C1HWNCoC0"};
|
|
163
|
-
I64_NCHW, // {"int64", "NCHW"};
|
|
164
|
-
I64_NHWC, // {"int64", "NHWC"};
|
|
165
|
-
I64_HWCN, // {"int64", "HWCN"};
|
|
166
|
-
I64_NDHWC, // {"int64", "NDHWC"};
|
|
167
|
-
I64_ChannelLast, // {"int64", "ChannelLast"};
|
|
168
|
-
I64_Default_Tuple, // {"int64", "DefaultFormat", "tuple"};
|
|
169
|
-
I64_Default_List, // {"int64", "DefaultFormat", "list"};
|
|
170
|
-
|
|
171
|
-
U64_None, // {"uint64", ""};
|
|
172
|
-
U64_Default, // {"uint64", "DefaultFormat"};
|
|
173
|
-
U64_5HD, // {"uint64", "NC1HWC0"};
|
|
174
|
-
U64_FracZ, // {"uint64", "FRACTAL_Z"};
|
|
175
|
-
U64_FracNZ, // {"uint64", "FRACTAL_NZ"};
|
|
176
|
-
U64_C1HWNCoC0, // {"uint64", "C1HWNCoC0"};
|
|
177
|
-
U64_NCHW, // {"uint64", "NCHW"};
|
|
178
|
-
U64_NHWC, // {"uint64", "NHWC"};
|
|
179
|
-
U64_HWCN, // {"uint64", "HWCN"};
|
|
180
|
-
U64_NDHWC, // {"uint64", "NDHWC"};
|
|
181
|
-
U64_ChannelLast, // {"uint64", "ChannelLast"};
|
|
182
|
-
U64_Default_Tuple, // {"uint64", "DefaultFormat", "tuple"};
|
|
183
|
-
U64_Default_List, // {"uint64", "DefaultFormat", "list"};
|
|
184
|
-
|
|
185
|
-
F16_None, // {"float16", ""};
|
|
186
|
-
F16_Default, // {"float16", "DefaultFormat"};
|
|
187
|
-
F16_5HD, // {"float16", "NC1HWC0"};
|
|
188
|
-
F16_FracZ, // {"float16", "FRACTAL_Z"};
|
|
189
|
-
F16_FracNZ, // {"float16", "FRACTAL_NZ"};
|
|
190
|
-
F16_C1HWNCoC0, // {"float16", "C1HWNCoC0"};
|
|
191
|
-
F16_NCHW, // {"float16", "NCHW"};
|
|
192
|
-
F16_NHWC, // {"float16", "NHWC"};
|
|
193
|
-
F16_HWCN, // {"float16", "HWCN"};
|
|
194
|
-
F16_NDHWC, // {"float16", "NDHWC"};
|
|
195
|
-
F16_NCDHW, // {"float16", "NCDHW"};
|
|
196
|
-
F16_DHWCN, // {"float16", "DHWCN"};
|
|
197
|
-
F16_NDC1HWC0, // {"float16", "NDC1HWC0"};
|
|
198
|
-
F16_FRACTAL_Z_3D, // {"float16", "FRACTAL_Z_3D"};
|
|
199
|
-
F16_FracZNLSTM, // {"float16", "FRACTAL_ZN_LSTM"};
|
|
200
|
-
F16_FracZNRNN, // {"float16", "FRACTAL_ZN_RNN"};
|
|
201
|
-
F16_ND_RNNBIAS, // {"float16", "ND_RNN_BIAS"};
|
|
202
|
-
F16_ChannelLast, // {"float16", "ChannelLast"};
|
|
203
|
-
F16_Default_Tuple, // {"float16", "DefaultFormat", "tuple"};
|
|
204
|
-
F16_Default_List, // {"float16", "DefaultFormat", "list"};
|
|
205
|
-
|
|
206
|
-
F32_None, // {"float32", ""};
|
|
207
|
-
F32_Default, // {"float32", "DefaultFormat"};
|
|
208
|
-
F32_5HD, // {"float32", "NC1HWC0"};
|
|
209
|
-
F32_FracZ, // {"float32", "FRACTAL_Z"};
|
|
210
|
-
F32_FracNZ, // {"float32", "FRACTAL_NZ"};
|
|
211
|
-
F32_C1HWNCoC0, // {"float32", "C1HWNCoC0"};
|
|
212
|
-
F32_NCHW, // {"float32", "NCHW"};
|
|
213
|
-
F32_NHWC, // {"float32", "NHWC"};
|
|
214
|
-
F32_HWCN, // {"float32", "HWCN"};
|
|
215
|
-
F32_NDHWC, // {"float32", "NDHWC"};
|
|
216
|
-
F32_NCDHW, // {"float32", "NCDHW"};
|
|
217
|
-
F32_DHWCN, // {"float32", "DHWCN"};
|
|
218
|
-
F32_NDC1HWC0, // {"float32", "NDC1HWC0"};
|
|
219
|
-
F32_FRACTAL_Z_3D, // {"float32", "FRACTAL_Z_3D"};
|
|
220
|
-
F32_FracZNLSTM, // {"float32", "FRACTAL_ZN_LSTM"};
|
|
221
|
-
F32_FracZNRNN, // {"float32", "FRACTAL_ZN_RNN"};
|
|
222
|
-
F32_ND_RNNBIAS, // {"float32", "ND_RNN_BIAS"};
|
|
223
|
-
F32_ChannelLast, // {"float32", "ChannelLast"};
|
|
224
|
-
F32_Default_Tuple, // {"float32", "DefaultFormat", "tuple"};
|
|
225
|
-
F32_Default_List, // {"float32", "DefaultFormat", "list"};
|
|
226
|
-
|
|
227
|
-
F64_None, // {"float64", ""};
|
|
228
|
-
F64_Default, // {"float64", "DefaultFormat"};
|
|
229
|
-
F64_5HD, // {"float64", "NC1HWC0"};
|
|
230
|
-
F64_FracZ, // {"float64", "FRACTAL_Z"};
|
|
231
|
-
F64_FracNZ, // {"float64", "FRACTAL_NZ"};
|
|
232
|
-
F64_C1HWNCoC0, // {"float64", "C1HWNCoC0"};
|
|
233
|
-
F64_NCHW, // {"float64", "NCHW"};
|
|
234
|
-
F64_NHWC, // {"float64", "NHWC"};
|
|
235
|
-
F64_HWCN, // {"float64", "HWCN"};
|
|
236
|
-
F64_NDHWC, // {"float64", "NDHWC"};
|
|
237
|
-
F64_ChannelLast, // {"float64", "ChannelLast"};
|
|
238
|
-
F64_Default_Tuple, // {"float64", "DefaultFormat", "tuple"};
|
|
239
|
-
F64_Default_List, // {"float64", "DefaultFormat", "list"};
|
|
240
|
-
|
|
241
|
-
C64_Default, // {"complex64", "DefaultFormat"};
|
|
242
|
-
C128_Default, // {"complex128", "DefaultFormat"};
|
|
243
|
-
} DTypeFormat;
|
|
244
|
-
|
|
245
|
-
typedef enum OptPassID {
|
|
246
|
-
MS_AUTO_MONAD_ELIM_PASS, // eliminate extra monad nodes
|
|
247
|
-
} OptPassID;
|
|
248
|
-
|
|
249
|
-
typedef enum PadMode {
|
|
250
|
-
PAD = 0,
|
|
251
|
-
SAME = 1,
|
|
252
|
-
VALID = 2,
|
|
253
|
-
FULL = 3,
|
|
254
|
-
} PadMode;
|
|
255
|
-
|
|
256
|
-
typedef enum Format {
|
|
257
|
-
DEFAULT_FORMAT = -1,
|
|
258
|
-
NCHW = 0,
|
|
259
|
-
NHWC = 1,
|
|
260
|
-
NHWC4 = 2,
|
|
261
|
-
HWKC = 3,
|
|
262
|
-
HWCK = 4,
|
|
263
|
-
KCHW = 5,
|
|
264
|
-
CKHW = 6,
|
|
265
|
-
KHWC = 7,
|
|
266
|
-
CHWK = 8,
|
|
267
|
-
HW = 9,
|
|
268
|
-
HW4 = 10,
|
|
269
|
-
NC = 11,
|
|
270
|
-
NC4 = 12,
|
|
271
|
-
NC4HW4 = 13,
|
|
272
|
-
NUM_OF_FORMAT = 14,
|
|
273
|
-
NCDHW = 15,
|
|
274
|
-
NWC = 16,
|
|
275
|
-
NCW = 17,
|
|
276
|
-
NDHWC = 18,
|
|
277
|
-
NC8HW8 = 19
|
|
278
|
-
} Format;
|
|
279
|
-
|
|
280
|
-
#ifdef __cplusplus
|
|
281
|
-
}
|
|
282
|
-
#endif
|
|
283
|
-
#endif // MINDSPORE_CCSRC_C_API_BASE_TYPES_H_
|