Browse Source

!615 Slog adjust

From: @taoxiangdong
Reviewed-by: @wqtshg
Signed-off-by:
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
1597c38164
7 changed files with 8 additions and 25 deletions
  1. +1
    -0
      ge/common/CMakeLists.txt
  2. +1
    -0
      ge/executor/CMakeLists.txt
  3. +1
    -0
      ge/ge_local_engine/CMakeLists.txt
  4. +1
    -0
      ge/graph/build/memory/CMakeLists.txt
  5. +1
    -0
      ge/host_cpu_engine/CMakeLists.txt
  6. +3
    -0
      ge/offline/CMakeLists.txt
  7. +0
    -25
      third_party/fwkacllib/inc/toolchain/slog.h

+ 1
- 0
ge/common/CMakeLists.txt View File

@@ -130,6 +130,7 @@ target_compile_definitions(ge_common_static PRIVATE
google=ascend_private
$<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0>
$<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX>
LOG_CPP
)

target_compile_options(ge_common_static PRIVATE


+ 1
- 0
ge/executor/CMakeLists.txt View File

@@ -173,6 +173,7 @@ target_compile_definitions(ge_executor PRIVATE
google=ascend_private
$<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0>
$<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX>
LOG_CPP
)

target_include_directories(ge_executor PRIVATE


+ 1
- 0
ge/ge_local_engine/CMakeLists.txt View File

@@ -203,6 +203,7 @@ target_compile_options(ge_local_opskernel_builder_static PRIVATE

target_compile_definitions(ge_local_opskernel_builder_static PRIVATE
google=ascend_private
LOG_CPP
)

target_include_directories(ge_local_opskernel_builder_static PRIVATE


+ 1
- 0
ge/graph/build/memory/CMakeLists.txt View File

@@ -18,6 +18,7 @@ target_compile_options(ge_memory PRIVATE

target_compile_definitions(ge_memory PRIVATE
google=ascend_private
LOG_CPP
)

target_link_libraries(ge_memory PRIVATE


+ 1
- 0
ge/host_cpu_engine/CMakeLists.txt View File

@@ -193,6 +193,7 @@ target_compile_options(host_cpu_opskernel_builder_static PRIVATE

target_compile_definitions(host_cpu_opskernel_builder_static PRIVATE
google=ascend_private
LOG_CPP
)

target_include_directories(host_cpu_opskernel_builder_static PRIVATE


+ 3
- 0
ge/offline/CMakeLists.txt View File

@@ -27,6 +27,7 @@ target_compile_definitions(atc PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
COMPILE_OMG_PACKAGE
google=ascend_private
LOG_CPP
)

target_include_directories(atc PRIVATE
@@ -87,6 +88,7 @@ target_compile_definitions(atc_atc.bin PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
COMPILE_OMG_PACKAGE
google=ascend_private
LOG_CPP
)

target_include_directories(atc_atc.bin PRIVATE
@@ -152,6 +154,7 @@ target_compile_definitions(fwk_atc.bin PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
COMPILE_OMG_PACKAGE
google=ascend_private
LOG_CPP
)

target_include_directories(fwk_atc.bin PRIVATE


+ 0
- 25
third_party/fwkacllib/inc/toolchain/slog.h View File

@@ -18,9 +18,7 @@
#define D_SYSLOG_H_

#ifdef __cplusplus
#ifndef LOG_CPP
extern "C" {
#endif
#endif // __cplusplus

#ifndef LINUX
@@ -107,7 +105,6 @@ extern "C" {
#define SECURITY_LOG_MASK (0x00100000)
#define RUN_LOG_MASK (0x01000000)
#define OPERATION_LOG_MASK (0x10000000)
#define RESERVERD_LENGTH 52

typedef struct tagDCODE {
const char *cName;
@@ -119,18 +116,6 @@ typedef struct tagKV {
char *value;
} KeyValue;

typedef enum {
APPLICATION = 0,
SYSTEM
} ProcessType;

typedef struct {
ProcessType type;
unsigned int pid;
unsigned int deviceId;
char reserved[RESERVERD_LENGTH];
} LogAttr;

/**
* @ingroup slog
*
@@ -243,14 +228,6 @@ DLL_EXPORT int dlog_setlevel(int moduleId, int level, int enableEvent);
*/
DLL_EXPORT int CheckLogLevel(int moduleId, int logLevel);

/**
* @ingroup slog
* @brief DlogSetAttr: set log attr, default pid is 0, default device id is 0, default process type is APPLICATION
* @param [in]logAttr: attr info, include pid(must be larger than 0), process type and device id(chip ID)
* @return: 0: SUCCEED, others: FAILED
*/
DLL_EXPORT int DlogSetAttr(LogAttr logAttr);

/**
* @ingroup slog
* @brief dlog_error: print error log
@@ -390,8 +367,6 @@ void DlogInner(int moduleId, int level, const char *fmt, ...);
void DlogWithKVInner(int moduleId, int level, KeyValue *pstKVArray, int kvNum, const char *fmt, ...);

#ifdef __cplusplus
#ifndef LOG_CPP
}
#endif // LOG_CPP
#endif // __cplusplus
#endif // D_SYSLOG_H_

Loading…
Cancel
Save