| @@ -1,10 +0,0 @@ | |||||
| approvers: | |||||
| - ji_chen | |||||
| - wqtshg | |||||
| - zhangfan_hq | |||||
| reviewers: | |||||
| - justin_zhao | |||||
| - zhangyongfeng88 | |||||
| - w00267184 | |||||
| options: | |||||
| no_parent_owners: true | |||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -164,6 +164,7 @@ typedef enum { | |||||
| ACL_FORMAT_NC1HWC0 = 3, | ACL_FORMAT_NC1HWC0 = 3, | ||||
| ACL_FORMAT_FRACTAL_Z = 4, | ACL_FORMAT_FRACTAL_Z = 4, | ||||
| ACL_FORMAT_NC1HWC0_C04 = 12, | ACL_FORMAT_NC1HWC0_C04 = 12, | ||||
| ACL_FORMAT_HWCN = 16, | |||||
| ACL_FORMAT_NDHWC = 27, | ACL_FORMAT_NDHWC = 27, | ||||
| ACL_FORMAT_FRACTAL_NZ = 29, | ACL_FORMAT_FRACTAL_NZ = 29, | ||||
| ACL_FORMAT_NCDHW = 30, | ACL_FORMAT_NCDHW = 30, | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -72,7 +72,7 @@ class GE_FUNC_VISIBILITY Session { | |||||
| /// @return Status result of function | /// @return Status result of function | ||||
| /// | /// | ||||
| ATTRIBUTED_DEPRECATED(Status AddGraph(uint32_t, const Graph &, const std::map<AscendString, AscendString> &)) | ATTRIBUTED_DEPRECATED(Status AddGraph(uint32_t, const Graph &, const std::map<AscendString, AscendString> &)) | ||||
| Status AddGraph(uint32_t graphId, const Graph &graph, const std::map<std::string, std::string> &options); | |||||
| Status AddGraph(uint32_t graph_id, const Graph &graph, const std::map<std::string, std::string> &options); | |||||
| /// | /// | ||||
| /// @ingroup client | /// @ingroup client | ||||
| @@ -82,7 +82,7 @@ class GE_FUNC_VISIBILITY Session { | |||||
| /// @param [in] options graph options | /// @param [in] options graph options | ||||
| /// @return Status result of function | /// @return Status result of function | ||||
| /// | /// | ||||
| Status AddGraph(uint32_t graphId, const Graph &graph, const std::map<AscendString, AscendString> &options); | |||||
| Status AddGraph(uint32_t graph_id, const Graph &graph, const std::map<AscendString, AscendString> &options); | |||||
| /// | /// | ||||
| /// @ingroup client | /// @ingroup client | ||||
| @@ -119,7 +119,7 @@ class GE_FUNC_VISIBILITY Session { | |||||
| /// @param [out] outputs output data | /// @param [out] outputs output data | ||||
| /// @return Status result of function | /// @return Status result of function | ||||
| /// | /// | ||||
| Status RunGraph(uint32_t graphId, const std::vector<Tensor> &inputs, std::vector<Tensor> &outputs); | |||||
| Status RunGraph(uint32_t graph_id, const std::vector<Tensor> &inputs, std::vector<Tensor> &outputs); | |||||
| /// | /// | ||||
| /// @ingroup ge_graph | /// @ingroup ge_graph | ||||
| @@ -140,9 +140,9 @@ class GE_FUNC_VISIBILITY Session { | |||||
| /// @param [in] inputs: input data | /// @param [in] inputs: input data | ||||
| /// @return Status result of function | /// @return Status result of function | ||||
| /// | /// | ||||
| Status BuildGraph(uint32_t graphId, const std::vector<InputTensorInfo> &inputs); | |||||
| Status BuildGraph(uint32_t graph_id, const std::vector<InputTensorInfo> &inputs); | |||||
| Status BuildGraph(uint32_t graphId, const std::vector<ge::Tensor> &inputs); /*lint !e148*/ | |||||
| Status BuildGraph(uint32_t graph_id, const std::vector<ge::Tensor> &inputs); /*lint !e148*/ | |||||
| /// | /// | ||||
| /// @ingroup ge_graph | /// @ingroup ge_graph | ||||
| @@ -154,7 +154,7 @@ class GE_FUNC_VISIBILITY Session { | |||||
| /// Please ensure that the implementation of the function is trusted. | /// Please ensure that the implementation of the function is trusted. | ||||
| /// @return Status result of function | /// @return Status result of function | ||||
| /// | /// | ||||
| Status RunGraphAsync(uint32_t graphId, const std::vector<ge::Tensor> &inputs, RunAsyncCallback callback); | |||||
| Status RunGraphAsync(uint32_t graph_id, const std::vector<ge::Tensor> &inputs, RunAsyncCallback callback); | |||||
| /// | /// | ||||
| /// @ingroup ge_graph | /// @ingroup ge_graph | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /** | /** | ||||
| * Copyright 2019-2020 Huawei Technologies Co., Ltd | |||||
| * Copyright 2019-2022 Huawei Technologies Co., Ltd | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -23,7 +23,6 @@ | |||||
| #include "ge/ge_api_error_codes.h" | #include "ge/ge_api_error_codes.h" | ||||
| #include "nlohmann/json.hpp" | #include "nlohmann/json.hpp" | ||||
| #include "graph/op_desc.h" | #include "graph/op_desc.h" | ||||
| #include "graph/types.h" | |||||
| #include "graph/ge_tensor.h" | #include "graph/ge_tensor.h" | ||||
| namespace ge { | namespace ge { | ||||
| @@ -20,7 +20,6 @@ | |||||
| #include <memory> | #include <memory> | ||||
| #include <string> | #include <string> | ||||
| #include "framework/common/fmk_types.h" | |||||
| #include "framework/common/helper/om_file_helper.h" | #include "framework/common/helper/om_file_helper.h" | ||||
| #include "common/model/ge_model.h" | #include "common/model/ge_model.h" | ||||
| #include "common/model/ge_root_model.h" | #include "common/model/ge_root_model.h" | ||||
| @@ -34,7 +34,6 @@ | |||||
| #include <google/protobuf/map.h> | #include <google/protobuf/map.h> | ||||
| #include <unordered_map> | #include <unordered_map> | ||||
| #include <string> | #include <string> | ||||
| #include "external/graph/types.h" | |||||
| #include "graph/debug/ge_attr_define.h" | #include "graph/debug/ge_attr_define.h" | ||||
| #include "proto/om.pb.h" | #include "proto/om.pb.h" | ||||
| @@ -21,8 +21,6 @@ | |||||
| #include <vector> | #include <vector> | ||||
| #include "framework/common/op/attr_value_util.h" | #include "framework/common/op/attr_value_util.h" | ||||
| #include "register/register_types.h" | |||||
| #include "register/register_error_codes.h" | |||||
| #include "framework/common/util.h" | #include "framework/common/util.h" | ||||
| #include "graph/attr_value.h" | #include "graph/attr_value.h" | ||||
| #include "graph/ge_tensor.h" | #include "graph/ge_tensor.h" | ||||
| @@ -52,6 +52,21 @@ enum { | |||||
| kOpExecute, | kOpExecute, | ||||
| kAllocMem, | kAllocMem, | ||||
| kCopyH2D, | kCopyH2D, | ||||
| kPrepareNode, | |||||
| kWaitForPrepareDone, | |||||
| kPropgateOutputs, | |||||
| kOnNodeDoneCallback, | |||||
| kValidateInputTensor, | |||||
| kAfterExecuted, | |||||
| kRtEventSychronize, | |||||
| kInferShapeWaitDependShape, | |||||
| kInferShapeWaitInputTensor, | |||||
| kInferShapeCallInferFunc, | |||||
| kInferShapePropgate, | |||||
| // v2 control node | |||||
| kSelectBranch, | |||||
| kExecuteSubGraph, | |||||
| kInitSubGraphExecutor, | |||||
| // Add new definitions here | // Add new definitions here | ||||
| kProfilingIndexEnd | kProfilingIndexEnd | ||||
| @@ -18,7 +18,6 @@ | |||||
| #define INC_FRAMEWORK_COMMON_SCOPE_GUARD_H_ | #define INC_FRAMEWORK_COMMON_SCOPE_GUARD_H_ | ||||
| #include <functional> | #include <functional> | ||||
| #include <iostream> | |||||
| /// Usage: | /// Usage: | ||||
| /// Acquire Resource 1 | /// Acquire Resource 1 | ||||
| @@ -17,11 +17,9 @@ | |||||
| #ifndef AIR_INC_FRAMEWORK_COMMON_UTIL_H_ | #ifndef AIR_INC_FRAMEWORK_COMMON_UTIL_H_ | ||||
| #define AIR_INC_FRAMEWORK_COMMON_UTIL_H_ | #define AIR_INC_FRAMEWORK_COMMON_UTIL_H_ | ||||
| #include <climits> | |||||
| #include <cmath> | #include <cmath> | ||||
| #include <sstream> | #include <sstream> | ||||
| #include <string> | #include <string> | ||||
| #include <vector> | |||||
| #include <google/protobuf/text_format.h> | #include <google/protobuf/text_format.h> | ||||
| #include "external/graph/types.h" | #include "external/graph/types.h" | ||||
| @@ -315,6 +315,10 @@ class GE_FUNC_VISIBILITY GeExecutor { | |||||
| static Status LoadDynamicSingleOpV2(const std::string &model_name, const ModelData &model_data, void *const stream, | static Status LoadDynamicSingleOpV2(const std::string &model_name, const ModelData &model_data, void *const stream, | ||||
| DynamicSingleOp **const single_op, const uint64_t model_id); | DynamicSingleOp **const single_op, const uint64_t model_id); | ||||
| static Status UnloadSingleOp(const uint64_t op_id); | |||||
| static Status UnloadDynamicSingleOp(const uint64_t op_id); | |||||
| static Status ExecuteAsync(DynamicSingleOp *const executor, const std::vector<GeTensorDesc> &input_desc, | static Status ExecuteAsync(DynamicSingleOp *const executor, const std::vector<GeTensorDesc> &input_desc, | ||||
| const std::vector<DataBuffer> &inputs, std::vector<GeTensorDesc> &output_desc, | const std::vector<DataBuffer> &inputs, std::vector<GeTensorDesc> &output_desc, | ||||
| std::vector<DataBuffer> &outputs); | std::vector<DataBuffer> &outputs); | ||||
| @@ -21,8 +21,6 @@ | |||||
| #include "framework/omg/parser/parser_types.h" | #include "framework/omg/parser/parser_types.h" | ||||
| #include "framework/omg/omg_inner_types.h" | #include "framework/omg/omg_inner_types.h" | ||||
| #include "proto/om.pb.h" | #include "proto/om.pb.h" | ||||
| #include "graph/ge_tensor.h" | |||||
| #include "graph/op_desc.h" | |||||
| #include "graph/utils/op_desc_utils.h" | #include "graph/utils/op_desc_utils.h" | ||||
| using google::protobuf::Message; | using google::protobuf::Message; | ||||
| @@ -18,7 +18,6 @@ | |||||
| #define INC_FRAMEWORK_OMG_VERSION_H_ | #define INC_FRAMEWORK_OMG_VERSION_H_ | ||||
| #include <memory> | #include <memory> | ||||
| #include <set> | |||||
| #include "framework/common/debug/log.h" | #include "framework/common/debug/log.h" | ||||
| #include "framework/common/string_util.h" | #include "framework/common/string_util.h" | ||||
| @@ -1 +1 @@ | |||||
| Subproject commit 0a2335712484f85cd44a0f2402eac6932b22b40a | |||||
| Subproject commit ab3207e99f94aabf036e1c8b068de0df15ff2d01 | |||||
| @@ -62,6 +62,7 @@ static const int32_t ACL_ERROR_RT_OVER_LIMIT = 207012; // over l | |||||
| static const int32_t ACL_ERROR_RT_QUEUE_EMPTY = 207013; // queue is empty | static const int32_t ACL_ERROR_RT_QUEUE_EMPTY = 207013; // queue is empty | ||||
| static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is full | static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is full | ||||
| static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init | static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init | ||||
| static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow | |||||
| static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | ||||
| static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | ||||
| @@ -1496,17 +1496,23 @@ REG_OP(QueueData) | |||||
| /** | /** | ||||
| * @brief Ensures that the tensor's shape matches the expected shape. \n | * @brief Ensures that the tensor's shape matches the expected shape. \n | ||||
| * @par Inputs: | * @par Inputs: | ||||
| * x: A Tensor. \n | |||||
| * input: A Tensor. that need to be checked with desired shape | |||||
| * Must be one of the following types: | |||||
| * int8, uint8, int16, uint16, int32, int64, float16, float | |||||
| * double, complex64 complex128 \n | |||||
| * @par Attributes: | * @par Attributes: | ||||
| * shape: The shape that needs to be checked \n | |||||
| * shape: required, a desired tensor shape. type: list int \n | |||||
| * @par Outputs: | * @par Outputs: | ||||
| * y: A tensor. \n | |||||
| * output: A tensor. has the same type and contents as input | |||||
| * Must be one of the following types: | |||||
| * int8, uint8, int16, uint16, int32, int64, float16, float | |||||
| * double, complex64 complex128 \n | |||||
| */ | */ | ||||
| REG_OP(EnsureShape) | REG_OP(EnsureShape) | ||||
| .INPUT(input, TensorType({DT_INT8,DT_UINT8,DT_INT16,DT_UINT16,DT_INT32,DT_INT64,DT_FLOAT16, \ | |||||
| DT_FLOAT,DT_DOUBLE})) | |||||
| .OUTPUT(output, TensorType({DT_INT8,DT_UINT8,DT_INT16,DT_UINT16,DT_INT32,DT_INT64,DT_FLOAT16, \ | |||||
| DT_FLOAT,DT_DOUBLE})) | |||||
| .INPUT(input, TensorType({DT_INT8,DT_UINT8, DT_INT16, DT_UINT16, DT_INT32, DT_INT64, DT_FLOAT16, \ | |||||
| DT_FLOAT, DT_DOUBLE, DT_COMPLEX64, DT_COMPLEX128})) | |||||
| .OUTPUT(output, TensorType({DT_INT8, DT_UINT8, DT_INT16, DT_UINT16, DT_INT32, DT_INT64, DT_FLOAT16, \ | |||||
| DT_FLOAT,DT_DOUBLE, DT_COMPLEX64, DT_COMPLEX128})) | |||||
| .REQUIRED_ATTR(shape, ListInt) | .REQUIRED_ATTR(shape, ListInt) | ||||
| .OP_END_FACTORY_REG(EnsureShape) | .OP_END_FACTORY_REG(EnsureShape) | ||||
| } // namespace ge | } // namespace ge | ||||
| @@ -156,16 +156,15 @@ REG_OP(CTCBeamSearchDecoder) | |||||
| *@li log_alpha: The probability of possible trace of input to target. | *@li log_alpha: The probability of possible trace of input to target. | ||||
| *@par Attributes: | *@par Attributes: | ||||
| *@li blank : Blank label. Default 0. | |||||
| *@li blank: Blank label. Default 0. | |||||
| *@li reduction: Specifies the reduction to apply to the output. Default: 'mean'. | *@li reduction: Specifies the reduction to apply to the output. Default: 'mean'. | ||||
| *@li zero_infinity : Whether to zero infinite losses and the associated gradients. | |||||
| *@li label_max : The max length of targets. | |||||
| *@li zero_infinity: Whether to zero infinite losses and the associated gradients. | |||||
| *@par Third-party framework compatibility | |||||
| * @par Third-party framework compatibility: | |||||
| * Compatible with Pytorch CTCLoss operator. | * Compatible with Pytorch CTCLoss operator. | ||||
| *@attention Constraints: | *@attention Constraints: | ||||
| *The limit of Label’s length is 1K. | |||||
| * The limit of Label’s length is 1K. | |||||
| */ | */ | ||||
| REG_OP(CTCLossV2) | REG_OP(CTCLossV2) | ||||
| .INPUT(log_probs, TensorType({DT_FLOAT, DT_DOUBLE})) | .INPUT(log_probs, TensorType({DT_FLOAT, DT_DOUBLE})) | ||||
| @@ -177,38 +176,36 @@ REG_OP(CTCLossV2) | |||||
| .ATTR(blank, Int, 0) | .ATTR(blank, Int, 0) | ||||
| .ATTR(reduction, String, "mean") | .ATTR(reduction, String, "mean") | ||||
| .ATTR(zero_infinity, Bool, false) | .ATTR(zero_infinity, Bool, false) | ||||
| .ATTR(label_max, Int, 0) | |||||
| .OP_END_FACTORY_REG(CTCLossV2) | .OP_END_FACTORY_REG(CTCLossV2) | ||||
| /** | /** | ||||
| *@brief The Connectionist Temporal Classification loss grad. | *@brief The Connectionist Temporal Classification loss grad. | ||||
| *@par Inputs: | |||||
| * @par Inputs: | |||||
| *@li grad_out: Gradient renewal coefficient. Tensor of size (N), where N = batch size. | *@li grad_out: Gradient renewal coefficient. Tensor of size (N), where N = batch size. | ||||
| *@li log_probs: Tensor of size (T, N, C), where T =input length, N =batch size, | |||||
| * @li log_probs: Tensor of size (T, N, C), where T =input length, N =batch size, | |||||
| and C = number of classes (including blank). | and C = number of classes (including blank). | ||||
| It represent the logarithmized probabilities of the outputs. | It represent the logarithmized probabilities of the outputs. | ||||
| *@li targets: Tensor of size (N, S) or sum(target_lengths), where S = max target length. | *@li targets: Tensor of size (N, S) or sum(target_lengths), where S = max target length. | ||||
| It represent the target sequences. | It represent the target sequences. | ||||
| *@li input_lengths: Tuple or tensor of size (N). It represent the lengths of the inputs. | |||||
| * @li input_lengths: Tuple or tensor of size (N). It represent the lengths of the inputs. | |||||
| *@li target_lengths: Tuple or tensor of size (N). It represent lengths of the targets. | *@li target_lengths: Tuple or tensor of size (N). It represent lengths of the targets. | ||||
| *@li neg_log_likelihood: A loss value which is differentiable with respect to each input node. | |||||
| *@li log_alpha: The probability of possible trace of input to target. | |||||
| * @li neg_log_likelihood: A loss value which is differentiable with respect to each input node. | |||||
| * @li log_alpha: The probability of possible trace of input to target. | |||||
| *@par Outputs: | |||||
| * @par Outputs: | |||||
| *@li grad: Tensor of size (T, N, C), The grad of Connectionist Temporal Classification loss. | *@li grad: Tensor of size (T, N, C), The grad of Connectionist Temporal Classification loss. | ||||
| *@par Attributes: | |||||
| *@li blank : Blank label. Default 0. | |||||
| *@li reduction: Specifies the reduction to apply to the output. Default: 'mean'. | |||||
| *@li zero_infinity : Whether to zero infinite losses and the associated gradients. | |||||
| *@li label_max : The max length of targets. | |||||
| * @par Attributes: | |||||
| *@li blank: Blank label. Default 0. | |||||
| * @li reduction: Specifies the reduction to apply to the output. Default: 'mean'. | |||||
| * @li zero_infinity: Whether to zero infinite losses and the associated gradients. | |||||
| *@par Third-party framework compatibility | |||||
| * @par Third-party framework compatibility: | |||||
| * Compatible with Pytorch CTCLoss operator. | * Compatible with Pytorch CTCLoss operator. | ||||
| *@attention Constraints: | |||||
| *The limit of Label’s length is 1K. | |||||
| * @attention Constraints: | |||||
| * The limit of Label’s length is 1K. | |||||
| */ | */ | ||||
| REG_OP(CTCLossV2Grad) | REG_OP(CTCLossV2Grad) | ||||
| .INPUT(grad_out, TensorType({DT_FLOAT, DT_DOUBLE})) | .INPUT(grad_out, TensorType({DT_FLOAT, DT_DOUBLE})) | ||||
| @@ -222,7 +219,6 @@ REG_OP(CTCLossV2Grad) | |||||
| .ATTR(blank, Int, 0) | .ATTR(blank, Int, 0) | ||||
| .ATTR(reduction, String, "mean") | .ATTR(reduction, String, "mean") | ||||
| .ATTR(zero_infinity, Bool, false) | .ATTR(zero_infinity, Bool, false) | ||||
| .ATTR(label_max, Int, 0) | |||||
| .OP_END_FACTORY_REG(CTCLossV2Grad) | .OP_END_FACTORY_REG(CTCLossV2Grad) | ||||
| } // namespace ge | } // namespace ge | ||||
| @@ -349,6 +349,7 @@ REG_OP(ExtractGlimpse) | |||||
| *y:images converted to RGB . \n | *y:images converted to RGB . \n | ||||
| *@attention Constraints: | *@attention Constraints: | ||||
| *Input images currently supports DT_FLOAT, DT_DOUBLE . | |||||
| *Last dimension of input x must be size 3 . \n | *Last dimension of input x must be size 3 . \n | ||||
| *@par Third-party framework compatibility | *@par Third-party framework compatibility | ||||
| @@ -2307,5 +2308,52 @@ REG_OP(UpsampleNearest1dGrad) | |||||
| .REQUIRED_ATTR(output_size, ListInt) | .REQUIRED_ATTR(output_size, ListInt) | ||||
| .ATTR(scales, ListFloat, {}) | .ATTR(scales, ListFloat, {}) | ||||
| .OP_END_FACTORY_REG(UpsampleNearest1dGrad) | .OP_END_FACTORY_REG(UpsampleNearest1dGrad) | ||||
| /** | |||||
| * @brief JPEG encode input image with provided compression quality. \n | |||||
| * @par Inputs: | |||||
| * @li images: image is a 3-D uint8 tensor of shape [height, width, channels]. | |||||
| * @li quality: int32 jpeg compression quality value between 0 and 100, 0-D tensor. | |||||
| * @par Outputs: JPEG-encoded image | |||||
| * contents: an output string. \n | |||||
| * @par Third-party framework compatibility. | |||||
| * Compatible with tensorflow EncodeJpegVariableQuality operator. | |||||
| */ | |||||
| REG_OP(EncodeJpegVariableQuality) | |||||
| .INPUT(images, TensorType({DT_UINT8})) | |||||
| .INPUT(quality, TensorType({DT_INT32})) | |||||
| .OUTPUT(contents, TensorType({DT_STRING})) | |||||
| .OP_END_FACTORY_REG(EncodeJpegVariableQuality) | |||||
| /** | |||||
| * @brief image to transforms. \n | |||||
| * @par Inputs: | |||||
| * @li images: [batch, height, width, channels], 4-D tensor. | |||||
| * @li transforms: [batch, 8] or [1, 8] matrix, 2-D tensor. | |||||
| * @li outout_shape: [new_height, new_width], 1-D tensor. | |||||
| * @par Attributes: | |||||
| * @li interpolation: Interpolation method, "NEAREST" or "BILINEAR", 0-D tensor. | |||||
| * @li fill_mode: Defaults to "CONSTANT". Fill mode, "REFLECT", "WRAP", or "CONSTANT", 0-D tensor. | |||||
| * @par Outputs | |||||
| * transformed_images: has the same type as iamges, 4-D tensor with shape[batch, new_height, new_width, channels]. \n | |||||
| * @par Third-party framework compatibility. | |||||
| * Compatible with tensorflow ImageProjectiveTransform operator. | |||||
| */ | |||||
| REG_OP(ImageProjectiveTransform) | |||||
| .INPUT(images, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||||
| .INPUT(transforms, TensorType({DT_FLOAT})) | |||||
| .INPUT(output_shape, TensorType({DT_INT32})) | |||||
| .REQUIRED_ATTR(interpolation, String) | |||||
| .ATTR(fill_mode, String, "CONSTANT") | |||||
| .OUTPUT(transformed_images, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||||
| .OP_END_FACTORY_REG(ImageProjectiveTransform) | |||||
| } // namespace ge | } // namespace ge | ||||
| #endif // OPS_BUILT_IN_OP_PROTO_INC_IMAGE_OPS_H_ | #endif // OPS_BUILT_IN_OP_PROTO_INC_IMAGE_OPS_H_ | ||||
| @@ -1700,6 +1700,45 @@ REG_OP(GroupNormRelu) | |||||
| .REQUIRED_ATTR(num_groups, Int) | .REQUIRED_ATTR(num_groups, Int) | ||||
| .ATTR(eps, Float, 0.00001) | .ATTR(eps, Float, 0.00001) | ||||
| .OP_END_FACTORY_REG(GroupNormRelu) | .OP_END_FACTORY_REG(GroupNormRelu) | ||||
| } // namespace ge | |||||
| /** | |||||
| * @brief Function dropout with softmaxgrad and muls | |||||
| * @par Inputs: | |||||
| * Two inputs, including: | |||||
| * @li y_grad: A mutable Tensor. The type only support float16. | |||||
| * @li mask: A mutable Tensor. Must met all of the following rules: | |||||
| * shape of mask should be 1D. | |||||
| * dtype of mask should be uint8. | |||||
| * value of shape should met the following algorithm: | |||||
| * value = (size(x) + 128 - 1) // 128 * 128 | |||||
| * @li softmax_output: A mutable Tensor. Must met all of the following rules: | |||||
| * shape of softmax_output should be NZ. | |||||
| * dtype of softmax_output should be float16. | |||||
| * it is the output of softmax | |||||
| * @par Attributes: | |||||
| * @li input_keep_prob:A attribute used to judge which units should be keep. | |||||
| * Has the same type as "x" . \n | |||||
| * @li alpha: A attribute used to scale tensor. | |||||
| * Has the same type as "x" . \n | |||||
| * @li axes: A list of int. The dimension softmax would be performed on. Defaults | |||||
| * to "[-1]" . \n | |||||
| * @par Outputs: | |||||
| * x_grad: A mutable Tensor. Has the same type as "x". \n | |||||
| * @par Restrictions: | |||||
| * Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||||
| */ | |||||
| REG_OP(DropoutWithMulsAndSoftmaxGrad) | |||||
| .INPUT(y_grad, TensorType({ DT_FLOAT16 })) | |||||
| .INPUT(mask, TensorType({ DT_UINT8 })) | |||||
| .INPUT(softmax_output, TensorType({ DT_FLOAT16 })) | |||||
| .OUTPUT(x_grad, TensorType({ DT_FLOAT16 })) | |||||
| .REQUIRED_ATTR(input_keep_prob, Float) | |||||
| .REQUIRED_ATTR(alpha, Float) | |||||
| .ATTR(axes, ListInt, { -1 }) | |||||
| .OP_END_FACTORY_REG(DropoutWithMulsAndSoftmaxGrad) | |||||
| } // namespace ge | |||||
| #endif // OPS_BUILT_IN_OP_PROTO_INC_NN_NORM_OPS_H_ | #endif // OPS_BUILT_IN_OP_PROTO_INC_NN_NORM_OPS_H_ | ||||
| @@ -241,6 +241,29 @@ REG_OP(AscendRequantS16) | |||||
| .ATTR(dual_output, Bool, false) | .ATTR(dual_output, Bool, false) | ||||
| .ATTR(relu_flag, Bool, false) | .ATTR(relu_flag, Bool, false) | ||||
| .OP_END_FACTORY_REG(AscendRequantS16) | .OP_END_FACTORY_REG(AscendRequantS16) | ||||
| /** | |||||
| * @brief Quantizes the input of int8 . \n | |||||
| * @par Inputs: | |||||
| * @li x: An FRACTAL_Z tensor of type int8, specifying the input. | |||||
| * @li offset: An FRACTAL_Z tensor of type int8. | |||||
| * @par Attributes: | |||||
| * @li dst_type: A optional int from: DT_INT8, DT_INT4. Defaults to DT_INT8. | |||||
| * @par Outputs: | |||||
| * @li y: output tensor of type int4 or int8 and with format FRACTAL_Z. | |||||
| * @par Third-party framework compatibility | |||||
| * It is a custom operator. It has no corresponding operator in Caffe, Onnx, Tensorflow or Pythorch. | |||||
| */ | |||||
| REG_OP(AscendWeightQuant) | |||||
| .INPUT(x, TensorType({DT_INT8})) | |||||
| .INPUT(offset, TensorType({DT_INT8})) | |||||
| .OUTPUT(y, TensorType({DT_INT8, DT_INT4})) | |||||
| .ATTR(dst_type, Int, DT_INT8) | |||||
| .OP_END_FACTORY_REG(AscendWeightQuant) | |||||
| } // namespace ge | } // namespace ge | ||||
| #endif // OPS_BUILT_IN_OP_PROTO_INC_QUANTIZE_OPS_H_ | #endif // OPS_BUILT_IN_OP_PROTO_INC_QUANTIZE_OPS_H_ | ||||
| @@ -82,6 +82,12 @@ typedef enum tagRtDeviceModuleType { | |||||
| RT_MODULE_TYPE_VECTOR_CORE, /**< VECTOR CORE info*/ | RT_MODULE_TYPE_VECTOR_CORE, /**< VECTOR CORE info*/ | ||||
| } rtDeviceModuleType_t; | } rtDeviceModuleType_t; | ||||
| typedef enum tagRtMemRequestFeature { | |||||
| MEM_REQUEST_FEATURE_DEFAULT = 0, | |||||
| MEM_REQUEST_FEATURE_OPP, | |||||
| MEM_REQUEST_FEATURE_RESERVED | |||||
| } rtMemRequestFeature_t; | |||||
| // used for rtGetDevMsg callback function | // used for rtGetDevMsg callback function | ||||
| typedef void (*rtGetMsgCallback)(const char_t *msg, uint32_t len); | typedef void (*rtGetMsgCallback)(const char_t *msg, uint32_t len); | ||||
| @@ -418,6 +424,15 @@ RTS_API rtError_t rtDeviceResetWithoutTsd(int32_t devId); | |||||
| * @return RT_ERROR_INVALID_VALUE for error input | * @return RT_ERROR_INVALID_VALUE for error input | ||||
| */ | */ | ||||
| RTS_API rtError_t rtGetDevMsg(rtGetDevMsgType_t getMsgType, rtGetMsgCallback callback); | RTS_API rtError_t rtGetDevMsg(rtGetDevMsgType_t getMsgType, rtGetMsgCallback callback); | ||||
| /** | |||||
| * @ingroup dvrt_dev | |||||
| * @brief get ts mem type | |||||
| * @param [in] rtMemRequestFeature_t mem request feature type | |||||
| * @param [in] mem request size | |||||
| * @return RT_MEMORY_TS, RT_MEMORY_HBM, RT_MEMORY_TS | RT_MEMORY_POLICY_HUGE_PAGE_ONLY | |||||
| */ | |||||
| RTS_API uint32_t rtGetTsMemType(rtMemRequestFeature_t featureType, uint32_t memSize); | |||||
| #if defined(__cplusplus) | #if defined(__cplusplus) | ||||
| } | } | ||||
| #endif | #endif | ||||
| @@ -217,6 +217,13 @@ typedef void (*rtCallback_t)(void *fnData); | |||||
| #define RT_NORMAL_KERNEL_MODE (0x01U) | #define RT_NORMAL_KERNEL_MODE (0x01U) | ||||
| #define RT_ALL_KERNEL_MODE (0x02U) | #define RT_ALL_KERNEL_MODE (0x02U) | ||||
| /** | |||||
| * @ingroup rt_kernel | |||||
| * @brief SHAPE kernel type | |||||
| **/ | |||||
| #define RT_STATIC_SHAPE_KERNEL (0x00U) | |||||
| #define RT_DYNAMIC_SHAPE_KERNEL (0x01U) | |||||
| /** | /** | ||||
| * @ingroup rt_kernel | * @ingroup rt_kernel | ||||
| * @brief kernel L1 Fusion Dump bit flags | * @brief kernel L1 Fusion Dump bit flags | ||||
| @@ -335,6 +342,21 @@ RTS_API rtError_t rtQueryFunctionRegistered(const char_t *stubName); | |||||
| RTS_API rtError_t rtKernelConfigDump(uint32_t kind, uint32_t dumpSizePerBlock, uint32_t blockDim, void **dumpBaseAddr, | RTS_API rtError_t rtKernelConfigDump(uint32_t kind, uint32_t dumpSizePerBlock, uint32_t blockDim, void **dumpBaseAddr, | ||||
| rtStream_t stm); | rtStream_t stm); | ||||
| /** | |||||
| * @ingroup rt_kernel | |||||
| * @brief get kernel address and prefetchCnt | |||||
| * @param [in] hdl program for dynamic shape | |||||
| * @param [in] tilingKey tilingKey for dynamic shape | |||||
| * @param [in] stubFunc stubFunc for static shape | |||||
| * @param [in] flag flag for distinguishing between dynamic shape and static shape | |||||
| * @param [out] addr address of kernel function | |||||
| * @param [out] prefetchCnt prefetchCnt of kernel function | |||||
| * @return RT_ERROR_NONE for ok | |||||
| * @return RT_ERROR_INVALID_VALUE for error input | |||||
| */ | |||||
| RTS_API rtError_t rtKernelGetAddrAndPrefCnt(void *hdl, const uint64_t tilingKey, const void * const stubFunc, | |||||
| const uint32_t flag, void **addr, uint32_t *prefetchCnt); | |||||
| /** | /** | ||||
| * @ingroup rt_kernel | * @ingroup rt_kernel | ||||
| * @brief launch kernel to device | * @brief launch kernel to device | ||||
| @@ -336,6 +336,16 @@ RTS_API rtError_t rtSetTaskGenCallback(rtTaskGenCallback callback); | |||||
| */ | */ | ||||
| RTS_API rtError_t rtModelCreate(rtModel_t *mdl, uint32_t flag); | RTS_API rtError_t rtModelCreate(rtModel_t *mdl, uint32_t flag); | ||||
| /** | |||||
| * @ingroup rt_model | |||||
| * @brief set ge model id to aicpu | |||||
| * @param [in] model aicpu model | |||||
| * @param [in] extid ge model id | |||||
| * @return RT_ERROR_NONE for ok | |||||
| * @return RT_ERROR_INVALID_VALUE for error input | |||||
| */ | |||||
| rtError_t rtModelSetExtId(rtModel_t mdl, uint32_t extId); | |||||
| /** | /** | ||||
| * @ingroup rt_model | * @ingroup rt_model | ||||
| * @brief destroy model instance | * @brief destroy model instance | ||||
| @@ -34,6 +34,13 @@ | |||||
| extern "C" { | extern "C" { | ||||
| #endif // __cplusplus | #endif // __cplusplus | ||||
| struct InitFlowGwInfo { | |||||
| const char_t *groupName; | |||||
| uint64_t schedPolicy; | |||||
| uint64_t reschedInterval; | |||||
| char_t rsv[128]; | |||||
| }; | |||||
| /** | /** | ||||
| * @ingroup Open | * @ingroup Open | ||||
| * @brief Used for the Framework process to communicate with the TSDDaemon process, | * @brief Used for the Framework process to communicate with the TSDDaemon process, | ||||
| @@ -101,6 +108,27 @@ TDT_LIB_EXPORT uint32_t TsdOpenEx(const uint32_t logicDeviceId, const uint32_t r | |||||
| */ | */ | ||||
| TDT_LIB_EXPORT uint32_t TsdInitQs(const uint32_t logicDeviceId, const char_t * const groupName = nullptr); | TDT_LIB_EXPORT uint32_t TsdInitQs(const uint32_t logicDeviceId, const char_t * const groupName = nullptr); | ||||
| /** | |||||
| * @ingroup InitFlowGw | |||||
| * @brief Used for the Framework process to communicate with the TSDDaemon process, | |||||
| * and notify TSD to complete the initialization of FlowGw processes | |||||
| * | |||||
| * @par Function | |||||
| * Used for the Framework process to communicate with the TSDDaemon process, | |||||
| * and notify TSD to complete the initialization of other processes | |||||
| * | |||||
| * @param logicDeviceId [IN] type #unsigned int. Logic device ID | |||||
| * @param initInfo [IN] type #InitFlowGwInfo pointer. Initialization parameters | |||||
| * @retval TDT_OK Success | |||||
| * @retval OtherValues Failure | |||||
| * | |||||
| * @par Dependency | |||||
| * @li libtsdclient.so: Library to which the interface belongs. | |||||
| * @li tsd_client.h: Header file where the interface declaration is located. | |||||
| * @li data_common.h: Header file where 'TDT_StatusT' defined | |||||
| */ | |||||
| TDT_LIB_EXPORT uint32_t TsdInitFlowGw(const uint32_t logicDeviceId, const InitFlowGwInfo * const initInfo); | |||||
| /** | /** | ||||
| * @ingroup Close | * @ingroup Close | ||||
| * @brief notify TSDClient close resource | * @brief notify TSDClient close resource | ||||
| @@ -14,8 +14,8 @@ | |||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| #ifndef MSPROF_ENGINE_PROF_REPORTER_H_ | |||||
| #define MSPROF_ENGINE_PROF_REPORTER_H_ | |||||
| #ifndef MSPROF_ENGINE_PROF_REPORTER_H | |||||
| #define MSPROF_ENGINE_PROF_REPORTER_H | |||||
| #if (defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)) | #if (defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)) | ||||
| #define MSVP_PROF_API __declspec(dllexport) | #define MSVP_PROF_API __declspec(dllexport) | ||||