!32298 move the graph_kernel_flags.cc/h to graph_kernel's directory

Merge pull request !32298 from DeshiChen/0329_flags
This commit is contained in:
i-robot 2022-04-01 06:06:56 +00:00 committed by Gitee
commit e239e26598
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
32 changed files with 39 additions and 41 deletions

View File

@ -41,7 +41,7 @@
#include "include/common/utils/anfalgo.h"
#include "utils/ms_utils.h"
#include "include/common/utils/utils.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/helper.h"
#include "runtime/device/kernel_runtime_manager.h"
#include "runtime/pynative/op_runtime_info.h"

View File

@ -21,7 +21,7 @@
#include "ir/anf.h"
#include "utils/ms_utils.h"
#include "utils/trace_base.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/session/anf_runtime_algorithm.h"
#include "include/common/utils/anfalgo.h"
#include "plugin/factory/ms_factory.h"

View File

@ -82,7 +82,7 @@
#include "utils/ms_utils.h"
#include "include/common/utils/config_manager.h"
#include "utils/ms_context.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "include/common/utils/utils.h"
#include "abstract/utils.h"
#if ENABLE_CPU && ENABLE_GPU

View File

@ -9,4 +9,10 @@ if(ENABLE_AKG AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list(APPEND _GRAPH_KERNEL_SRC_FILES ${_GK_SRC_LIST})
add_library(_mindspore_common_graph_kernel_obj OBJECT ${_GRAPH_KERNEL_SRC_FILES})
else()
# GraphKernel only supports linux system now, but the GraphKernelFlags is a public class
set(_GRAPH_KERNEL_PUBLIC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/graph_kernel_flags.cc
)
add_library(_mindspore_common_graph_kernel_obj OBJECT ${_GRAPH_KERNEL_PUBLIC_FILES})
endif()

View File

@ -22,7 +22,7 @@
#include <algorithm>
#include "utils/ms_context.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "kernel/akg/akg_kernel_json_generator.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"
#include "common/graph_kernel/graph_kernel_helper.h"

View File

@ -22,7 +22,7 @@
#include "ir/func_graph.h"
#include "utils/ms_context.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "common/graph_kernel/add_atomic_clean.h"
#include "common/graph_kernel/add_stitch_atomic_clean_gpu.h"
#include "common/graph_kernel/arithmetic_simplify.h"

View File

@ -21,7 +21,7 @@
#include <string>
#include <memory>
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/pass_manager.h"
namespace mindspore::graphkernel {

View File

@ -28,7 +28,7 @@
#include "kernel/common_utils.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"
#include "common/graph_kernel/graph_kernel_helper.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
namespace mindspore::graphkernel {
class CostModelSplitSchemer : public SplitSchemer {

View File

@ -30,7 +30,7 @@
#include "backend/common/session/anf_runtime_algorithm.h"
#include "include/common/utils/anfalgo.h"
#include "ir/anf.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
namespace mindspore::graphkernel {
// operator which follows commutative rules

View File

@ -27,7 +27,7 @@
#include "utils/anf_utils.h"
#include "utils/ms_context.h"
#include "utils/file_utils.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "common/graph_kernel/core/graph_kernel_callback.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"
#include "common/graph_kernel/core/graph_builder.h"

View File

@ -24,7 +24,7 @@
#include "ir/graph_utils.h"
#include "utils/anf_utils.h"
#include "utils/ms_context.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "common/graph_kernel/core/graph_builder.h"
#include "common/graph_kernel/core/graph_kernel_callback.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"

View File

@ -25,7 +25,7 @@
#include "utils/anf_utils.h"
#include "utils/hash_map.h"
#include "utils/hash_set.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "kernel/akg/akg_kernel_json_generator.h"
#include "common/graph_kernel/core/graph_kernel_callback.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include <map>
#include <string>

View File

@ -14,15 +14,14 @@
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_INCLUDE_COMMON_UTILS_GRAPH_KERNEL_FLAGS_H
#define MINDSPORE_CCSRC_INCLUDE_COMMON_UTILS_GRAPH_KERNEL_FLAGS_H
#ifndef MINDSPORE_CCSRC_COMMON_GRAPH_KERNEL_GRAPH_KERNEL_FLAGS_H
#define MINDSPORE_CCSRC_COMMON_GRAPH_KERNEL_GRAPH_KERNEL_FLAGS_H
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <utility>
#include "include/common/visible.h"
namespace mindspore::graphkernel {
constexpr unsigned int OptLevel_0 = 0; // Disabled
@ -35,7 +34,7 @@ constexpr unsigned int OpLevel_0 = 0;
constexpr unsigned int OpLevel_1 = 1;
constexpr unsigned int OpLevel_MAX = 2;
class COMMON_EXPORT GraphKernelFlags {
class GraphKernelFlags {
public:
static const GraphKernelFlags &GetInstance();
@ -226,4 +225,4 @@ class COMMON_EXPORT GraphKernelFlags {
bool enable_graph_kernel_;
};
} // namespace mindspore::graphkernel
#endif // MINDSPORE_CCSRC_INCLUDE_COMMON_UTILS_GRAPH_KERNEL_FLAGS_H
#endif // MINDSPORE_CCSRC_COMMON_GRAPH_KERNEL_GRAPH_KERNEL_FLAGS_H

View File

@ -34,7 +34,7 @@
#include "ir/func_graph.h"
#include "include/common/utils/python_adapter.h"
#include "pipeline/jit/action.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
namespace mindspore::graphkernel {
namespace {

View File

@ -22,7 +22,7 @@
#include <tuple>
#include <utility>
#include <vector>
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/pass.h"
#include "ir/func_graph.h"

View File

@ -21,7 +21,7 @@
#include "backend/common/optimizer/const_input_to_attr.h"
#include "common/graph_kernel/core/graph_kernel_utils.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "utils/anf_utils.h"
#include "utils/ms_context.h"

View File

@ -20,7 +20,7 @@
#include <memory>
#include "ir/func_graph.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/pass/getitem_tuple.h"
#include "common/graph_kernel/core/graph_kernel_cluster.h"
#include "common/graph_kernel/core/graph_kernel_splitter.h"

View File

@ -22,7 +22,7 @@
#include <memory>
#include "backend/common/optimizer/pass_manager.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
namespace mindspore::graphkernel {
using opt::PassManager;

View File

@ -21,7 +21,7 @@
#include <queue>
#include <unordered_map>
#include <utility>
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "kernel/kernel.h"
#include "common/graph_kernel/graph_kernel_helper.h"
#include "kernel/common_utils.h"

View File

@ -18,7 +18,7 @@
#include <memory>
#include <set>
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/pass.h"
#include "common/graph_kernel/add_atomic_clean.h"
#include "ir/func_graph.h"

View File

@ -18,7 +18,7 @@
#include <algorithm>
#include <memory>
#include <utility>
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "common/mem_reuse/mem_reuse_checker.h"
#include "backend/common/optimizer/helper.h"

View File

@ -34,7 +34,7 @@
#include "nlohmann/json.hpp"
#include "ir/dtype.h"
#include "ir/func_graph.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "kernel/common_utils.h"
#include "kernel/akg/akg_kernel_json_generator.h"
#include "backend/common/session/anf_runtime_algorithm.h"

View File

@ -22,7 +22,7 @@
#include "runtime/dev.h"
#include "plugin/device/ascend/optimizer/ascend_backend_optimization.h"
#include "common/graph_kernel/adapter/graph_kernel_optimization.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "include/common/utils/utils.h"
#include "include/common/utils/parallel_context.h"
#include "plugin/device/ascend/hal/device/kernel_select_ascend.h"

View File

@ -21,7 +21,7 @@
#include "plugin/device/ascend/optimizer/ascend_backend_optimization.h"
#include "common/graph_kernel/adapter/graph_kernel_optimization.h"
#include "backend/common/session/ascend_auto_monad.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "plugin/device/ascend/hal/device/kernel_select_ascend.h"
#include "runtime/device/kernel_adjust.h"

View File

@ -158,7 +158,7 @@
#include "plugin/device/ascend/kernel/tbe/tbe_kernel_compile.h"
#include "utils/ms_context.h"
#include "include/common/utils/config_manager.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "include/common/debug/anf_ir_dump.h"
#include "include/common/debug/dump_proto.h"
#include "include/common/debug/draw.h"

View File

@ -18,7 +18,7 @@
#include "backend/common/session/anf_runtime_algorithm.h"
#include "include/common/utils/anfalgo.h"
#include "base/core_ops.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/fusion_id_allocator.h"
namespace mindspore {

View File

@ -24,7 +24,7 @@
#include "kernel/kernel_build_info.h"
#include "plugin/device/cpu/hal/device/kernel_select_cpu.h"
#include "utils/trace_base.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "backend/common/optimizer/optimizer.h"
#include "backend/common/optimizer/pass_manager.h"
#include "backend/common/optimizer/common_backend_optimization.h"

View File

@ -26,7 +26,7 @@
#include "plugin/device/gpu/hal/device/distribution/collective_init.h"
#include "include/common/utils/convert_utils.h"
#include "utils/ms_context.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "runtime/device/kernel_runtime_manager.h"
#include "plugin/device/gpu/hal/device/gpu_common.h"
#include "utils/ms_utils.h"

View File

@ -31,7 +31,7 @@
#include "plugin/device/gpu/kernel/cuda_impl/cuda_ops/cuda_common.h"
#include "plugin/device/gpu/hal/hardware/optimizer.h"
#include "runtime/device/ms_device_shape_transfer.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "plugin/device/gpu/hal/device/gpu_bucket.h"
#include "profiler/device/gpu/gpu_profiling.h"
#include "profiler/device/gpu/gpu_profiling_utils.h"

View File

@ -25,7 +25,7 @@
#include "runtime/device/ms_device_shape_transfer.h"
#include "runtime/pynative/op_runtime_info.h"
#include "include/common/utils/convert_utils.h"
#include "include/common/utils/context/graph_kernel_flags.h"
#include "common/graph_kernel/graph_kernel_flags.h"
#include "utils/ms_context.h"
#include "ir/tensor.h"
#include "backend/common/optimizer/helper.h"

View File

@ -1,7 +0,0 @@
files:
".*graph_kernel.*":
approvers:
- gaoxiong1
- ckey_dou
- anyrenwei
- dayschan