!3035 Refactoring for base and abstract types.

Merge pull request !3035 from ZhangQinghua/master
pull/3035/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit f65586cefa

@ -127,7 +127,7 @@ endif()
## make sub objects
set(SUB_COMP
transform pre_activate parallel pipeline device kernel common debug gvar ir onnx operator optimizer predict
pybind_api pynative session utils vm
pybind_api pynative session utils vm base abstract
)
foreach (_comp ${SUB_COMP})

@ -0,0 +1,3 @@
file(GLOB_RECURSE _ABSTRACT_ALL_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cc")
set_property(SOURCE ${_ABSTRACT_ALL_SRC_FILES} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ABSTRACT)
add_library(_mindspore_abstract_obj OBJECT ${_ABSTRACT_ALL_SRC_FILES})

@ -16,13 +16,12 @@
* limitations under the License.
*/
#include "pipeline/static_analysis/abstract_value.h"
#include "abstract/abstract_value.h"
#include <algorithm>
#include "utils/symbolic.h"
#include "pipeline/static_analysis/static_analysis.h"
#include "pipeline/static_analysis/utils.h"
#include "abstract/utils.h"
namespace mindspore {
namespace abstract {

@ -16,8 +16,8 @@
* limitations under the License.
*/
#ifndef PIPELINE_STATIC_ANALYSIS_ABSTRACT_VALUE_H_
#define PIPELINE_STATIC_ANALYSIS_ABSTRACT_VALUE_H_
#ifndef MINDSPORE_CCSRC_ABSTRACT_ABSTRACT_VALUE_H_
#define MINDSPORE_CCSRC_ABSTRACT_ABSTRACT_VALUE_H_
#include <utility>
#include <vector>
@ -27,11 +27,11 @@
#include "utils/log_adapter.h"
#include "utils/hashing.h"
#include "ir/base.h"
#include "base/base.h"
#include "ir/dtype.h"
#include "ir/value.h"
#include "ir/tensor.h"
#include "pipeline/static_analysis/dshape.h"
#include "abstract/dshape.h"
namespace mindspore {
namespace abstract {
@ -623,4 +623,4 @@ class AbstractIndexedSlices : public AbstractUndetermined {
};
} // namespace abstract
} // namespace mindspore
#endif // PIPELINE_STATIC_ANALYSIS_ABSTRACT_VALUE_H_
#endif // MINDSPORE_CCSRC_ABSTRACT_ABSTRACT_VALUE_H_

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "pipeline/static_analysis/analysis_context.h"
#include "abstract/analysis_context.h"
#include <algorithm>

@ -16,14 +16,14 @@
* limitations under the License.
*/
#ifndef PIPELINE_STATIC_ANALYSIS_ANALYSIS_CONTEXT_H_
#define PIPELINE_STATIC_ANALYSIS_ANALYSIS_CONTEXT_H_
#ifndef MINDSPORE_CCSRC_ABSTRACT_ANALYSIS_CONTEXT_H_
#define MINDSPORE_CCSRC_ABSTRACT_ANALYSIS_CONTEXT_H_
#include <memory>
#include <string>
#include <unordered_map>
#include "pipeline/static_analysis/abstract_value.h"
#include "abstract/abstract_value.h"
#include "ir/meta_func_graph.h"
namespace mindspore {
@ -85,4 +85,4 @@ struct ContextEqual {
extern const AnalysisContextPtr kDummyAnalysisContext;
} // namespace abstract
} // namespace mindspore
#endif // PIPELINE_STATIC_ANALYSIS_ANALYSIS_CONTEXT_H_
#endif // MINDSPORE_CCSRC_ABSTRACT_ANALYSIS_CONTEXT_H_

@ -16,7 +16,7 @@
* limitations under the License.
*/
#include "pipeline/static_analysis/dshape.h"
#include "abstract/dshape.h"
#include <exception>
#include <iostream>

@ -16,8 +16,8 @@
* limitations under the License.
*/
#ifndef PIPELINE_STATIC_ANALYSIS_DSHAPE_H_
#define PIPELINE_STATIC_ANALYSIS_DSHAPE_H_
#ifndef MINDSPORE_CCSRC_ABSTRACT_DSHAPE_H_
#define MINDSPORE_CCSRC_ABSTRACT_DSHAPE_H_
#include <vector>
#include <string>
@ -27,7 +27,7 @@
#include <memory>
#include "utils/log_adapter.h"
#include "ir/base.h"
#include "base/base.h"
namespace mindspore {
namespace abstract {
@ -132,4 +132,4 @@ using ListShapePtr = std::shared_ptr<ListShape>;
} // namespace abstract
} // namespace mindspore
#endif // PIPELINE_STATIC_ANALYSIS_DSHAPE_H_
#endif // MINDSPORE_CCSRC_ABSTRACT_DSHAPE_H_

@ -14,13 +14,13 @@
* limitations under the License.
*/
#include "pipeline/static_analysis/param_validator.h"
#include "abstract/param_validator.h"
#include <string>
#include <sstream>
#include <memory>
#include "utils/symbolic.h"
#include "pipeline/static_analysis/utils.h"
#include "abstract/utils.h"
namespace mindspore {
namespace abstract {

@ -14,15 +14,15 @@
* limitations under the License.
*/
#ifndef PIPELINE_STATIC_ANALYSIS_PARAM_VALIDATOR_H_
#define PIPELINE_STATIC_ANALYSIS_PARAM_VALIDATOR_H_
#ifndef MINDSPORE_CCSRC_ABSTRACT_PARAM_VALIDATOR_H_
#define MINDSPORE_CCSRC_ABSTRACT_PARAM_VALIDATOR_H_
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "pipeline/static_analysis/abstract_value.h"
#include "pipeline/static_analysis/utils.h"
#include "abstract/abstract_value.h"
#include "abstract/utils.h"
#include "utils/any.h"
#include "ir/primitive.h"
@ -97,4 +97,4 @@ void CheckArgsSpec(const AbstractBasePtrList &args_list) {
} // namespace abstract
} // namespace mindspore
#endif // PIPELINE_STATIC_ANALYSIS_PARAM_VALIDATOR_H_
#endif // MINDSPORE_CCSRC_ABSTRACT_PARAM_VALIDATOR_H_

@ -16,13 +16,13 @@
* limitations under the License.
*/
#include "pipeline/static_analysis/utils.h"
#include "abstract/utils.h"
#include <string>
#include <sstream>
#include <memory>
#include "utils/symbolic.h"
#include "pipeline/static_analysis/param_validator.h"
#include "abstract/param_validator.h"
namespace mindspore {
namespace abstract {

@ -16,14 +16,14 @@
* limitations under the License.
*/
#ifndef PIPELINE_STATIC_ANALYSIS_UTILS_H_
#define PIPELINE_STATIC_ANALYSIS_UTILS_H_
#ifndef MINDSPORE_CCSRC_ABSTRACT_UTILS_H_
#define MINDSPORE_CCSRC_ABSTRACT_UTILS_H_
#include <vector>
#include <utility>
#include <memory>
#include <string>
#include "pipeline/static_analysis/abstract_value.h"
#include "abstract/abstract_value.h"
#include "utils/any.h"
#include "utils/misc.h"
#include "utils/convert_utils.h"
@ -53,4 +53,4 @@ int GetPositiveAxis(int axis_value, size_t increment);
ShapePtr GetBroadcastShape(const std::string &op, const AbstractTensorPtr &tensor_x, const AbstractTensorPtr &tensor_y);
} // namespace abstract
} // namespace mindspore
#endif // PIPELINE_STATIC_ANALYSIS_UTILS_H_
#endif // MINDSPORE_CCSRC_ABSTRACT_UTILS_H_

@ -0,0 +1,3 @@
file(GLOB_RECURSE _BASE_ALL_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cc")
set_property(SOURCE ${_BASE_ALL_SRC_FILES} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_BASE)
add_library(_mindspore_base_obj OBJECT ${_BASE_ALL_SRC_FILES})

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "ir/base.h"
#include "base/base.h"
#include <atomic>
#include <mutex>
#include <unordered_map>

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_IR_BASE_H_
#define MINDSPORE_CCSRC_IR_BASE_H_
#ifndef MINDSPORE_CCSRC_BASE_BASE_H_
#define MINDSPORE_CCSRC_BASE_BASE_H_
#include <atomic>
#include <iostream>
@ -149,4 +149,4 @@ struct MS_EXPORT TypeIdManager {
};
} // namespace mindspore
#endif // MINDSPORE_CCSRC_IR_BASE_H_
#endif // MINDSPORE_CCSRC_BASE_BASE_H_

@ -23,8 +23,8 @@
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
#include "pipeline/static_analysis/dshape.h"
#include "pipeline/static_analysis/abstract_value.h"
#include "abstract/dshape.h"
#include "abstract/abstract_value.h"
#include "pipeline/static_analysis/abstract_function.h"
#include "pipeline/parse/python_adapter.h"
#include "pipeline/parse/parse.h"

@ -24,7 +24,7 @@
#include <utility>
#include <vector>
#include "ir/base.h"
#include "base/base.h"
#include "debug/trace_info.h"
namespace mindspore {

@ -24,7 +24,7 @@
#include <utility>
#include <vector>
#include "ir/base.h"
#include "base/base.h"
namespace mindspore {
class TraceInfo;

@ -20,7 +20,7 @@
#include <mutex>
#include <unordered_map>
#include "ir/base.h"
#include "base/base.h"
namespace mindspore {

@ -26,7 +26,7 @@
#include <unordered_map>
#include <utility>
#include "ir/base.h"
#include "base/base.h"
#include "debug/info.h"
#include "ir/scope.h"

@ -28,7 +28,7 @@
#include <type_traits>
#include <unordered_map>
#include <algorithm>
#include "ir/base.h"
#include "base/base.h"
#include "ir/named.h"
#include "ir/dtype/type.h"

@ -29,7 +29,7 @@
#include <type_traits>
#include <unordered_map>
#include <algorithm>
#include "ir/base.h"
#include "base/base.h"
#include "ir/named.h"
#include "ir/dtype/type.h"

@ -29,7 +29,7 @@
#include <type_traits>
#include <unordered_map>
#include <algorithm>
#include "ir/base.h"
#include "base/base.h"
#include "ir/named.h"
#include "ir/dtype/type.h"

@ -29,7 +29,7 @@
#include <type_traits>
#include <unordered_map>
#include <algorithm>
#include "ir/base.h"
#include "base/base.h"
#include "ir/named.h"
#include "ir/dtype/type.h"

@ -29,7 +29,7 @@
#include <type_traits>
#include <unordered_map>
#include <algorithm>
#include "ir/base.h"
#include "base/base.h"
#include "ir/named.h"
#include "ir/dtype/type.h"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save