Browse Source

!204 clangformat modification

Merge pull request !204 from HW_KK/master
pull/204/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
a5d9a75c85
4 changed files with 10 additions and 22 deletions
  1. +2
    -2
      src/ge/common/model_saver.h
  2. +1
    -0
      src/ge/graph/passes/identity_pass.h
  3. +1
    -1
      src/ge/graph/passes/transpose_transdata_pass.h
  4. +6
    -19
      src/ge/omm/csa_interact.h

+ 2
- 2
src/ge/common/model_saver.h View File

@@ -22,8 +22,8 @@
#include "framework/common/types.h" #include "framework/common/types.h"


/** /**
* Provide read and write operations for offline model files
*/
* Provide read and write operations for offline model files
*/
namespace ge { namespace ge {
using Json = nlohmann::json; using Json = nlohmann::json;




+ 1
- 0
src/ge/graph/passes/identity_pass.h View File

@@ -25,6 +25,7 @@ class IdentityPass : public BaseNodePass {
explicit IdentityPass(bool force) : force_(force) {} explicit IdentityPass(bool force) : force_(force) {}
~IdentityPass() override = default; ~IdentityPass() override = default;
Status Run(NodePtr &node) override; Status Run(NodePtr &node) override;

private: private:
bool force_ = false; bool force_ = false;
}; };


+ 1
- 1
src/ge/graph/passes/transpose_transdata_pass.h View File

@@ -23,6 +23,7 @@ namespace ge {
class TransposeTransDataPass : public BaseNodePass { class TransposeTransDataPass : public BaseNodePass {
public: public:
Status Run(NodePtr &node) override; Status Run(NodePtr &node) override;

private: private:
Status CheckOneInAndOneOutDataAnchor(NodePtr &node) const; Status CheckOneInAndOneOutDataAnchor(NodePtr &node) const;
Status RemoveTranspose(NodePtr &node); Status RemoveTranspose(NodePtr &node);
@@ -32,4 +33,3 @@ class TransposeTransDataPass : public BaseNodePass {
}; };
} // namespace ge } // namespace ge
#endif // GE_GRAPH_PASSES_TRANSPOSE_TRANSDATA_PASS_H_ #endif // GE_GRAPH_PASSES_TRANSPOSE_TRANSDATA_PASS_H_


+ 6
- 19
src/ge/omm/csa_interact.h View File

@@ -56,10 +56,7 @@ enum ErrorModule {
}; };


struct CsaErrorCode { struct CsaErrorCode {
CsaErrorCode()
: module_ret_errcode(0),
error_module(ERROR_MODULE_FMK),
job_sub_state(JOBSUBSTATE_OTHER) {}
CsaErrorCode() : module_ret_errcode(0), error_module(ERROR_MODULE_FMK), job_sub_state(JOBSUBSTATE_OTHER) {}
~CsaErrorCode() {} ~CsaErrorCode() {}
uint32_t module_ret_errcode; uint32_t module_ret_errcode;
ErrorModule error_module; ErrorModule error_module;
@@ -89,10 +86,8 @@ class CsaInteract {
/// @param [in] error_module error module identified by FMK /// @param [in] error_module error module identified by FMK
/// @return Status /// @return Status
/// ///
Status WriteJobState(JobState job_state,
JobSubState job_sub_state = JOBSUBSTATE_OTHER,
uint32_t module_ret_errcode = SUCCESS,
ErrorModule error_module = ERROR_MODULE_FMK);
Status WriteJobState(JobState job_state, JobSubState job_sub_state = JOBSUBSTATE_OTHER,
uint32_t module_ret_errcode = SUCCESS, ErrorModule error_module = ERROR_MODULE_FMK);


/// ///
/// @brief Update error code in the job state file /// @brief Update error code in the job state file
@@ -101,8 +96,7 @@ class CsaInteract {
/// @param [in] job_sub_state detailed job state /// @param [in] job_sub_state detailed job state
/// @return void /// @return void
/// ///
void WriteErrorCode(uint32_t module_ret_errcode, ErrorModule error_module,
JobSubState job_sub_state);
void WriteErrorCode(uint32_t module_ret_errcode, ErrorModule error_module, JobSubState job_sub_state);


/// ///
/// @brief Record errors that occurred durning the training /// @brief Record errors that occurred durning the training
@@ -111,9 +105,7 @@ class CsaInteract {
/// @param [in] job_sub_state detailed job state /// @param [in] job_sub_state detailed job state
/// @return void /// @return void
/// ///
void StoreInternalErrorCode(uint32_t module_ret_errcode,
ErrorModule error_module,
JobSubState job_sub_state);
void StoreInternalErrorCode(uint32_t module_ret_errcode, ErrorModule error_module, JobSubState job_sub_state);


/// ///
/// @brief Update training error code in the job state file /// @brief Update training error code in the job state file
@@ -130,11 +122,7 @@ class CsaInteract {


private: private:
CsaInteract() CsaInteract()
: dev_index_(0),
job_id_(0),
is_init_(false),
curr_state_(JOBSTATE_UNKOWN),
is_have_internal_error_(false) {}
: dev_index_(0), job_id_(0), is_init_(false), curr_state_(JOBSTATE_UNKOWN), is_have_internal_error_(false) {}


~CsaInteract() {} ~CsaInteract() {}


@@ -180,4 +168,3 @@ class CsaInteract {
} // namespace ge } // namespace ge


#endif // GE_OMM_CSA_INTERACT_H_ #endif // GE_OMM_CSA_INTERACT_H_


Loading…
Cancel
Save