Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodeStyle][CINN] fix cpplint codestyle [build/include_order] [build/header_guard] [build/include_subdir] [build/include] #55085

Merged
merged 5 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/cinn/backends/nvrtc/header_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "paddle/cinn/backends/nvrtc/header_generator.h"

#include <jitify.hpp>
#include "glog/logging.h"
#include "jitify.hpp"

namespace cinn {
namespace backends {
Expand Down
4 changes: 2 additions & 2 deletions paddle/cinn/common/arithmatic.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
#pragma once

#include "paddle/cinn/ir/ir.h"

#include <ginac/ginac.h>

#include <limits>
Expand All @@ -28,6 +26,8 @@
#include <string>
#include <tuple>

#include "paddle/cinn/ir/ir.h"

#ifdef As
#undef As
#endif
Expand Down
5 changes: 0 additions & 5 deletions paddle/cinn/common/target.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#include "paddle/cinn/common/target.h"
#include "paddle/cinn/runtime/cinn_runtime.h"

#ifdef CINN_WITH_CUDA
#include <cuda_runtime_api.h>
#include <driver_types.h>
#endif

namespace cinn {
namespace common {

Expand Down
2 changes: 0 additions & 2 deletions paddle/cinn/common/type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <unordered_map>
#include <utility>

#include "type.h"

namespace cinn {
namespace common {

Expand Down
5 changes: 5 additions & 0 deletions paddle/cinn/frontend/computation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_FRONTEND_COMPUTATION_H_
#define PADDLE_CINN_FRONTEND_COMPUTATION_H_
enkilee marked this conversation as resolved.
Show resolved Hide resolved

#include <iostream>

#include "paddle/cinn/frontend/net_builder.h"
Expand Down Expand Up @@ -169,3 +172,5 @@ class CinnComputation {

} // namespace frontend
} // namespace cinn

#endif // PADDLE_CINN_FRONTEND_COMPUTATION_H_
5 changes: 5 additions & 0 deletions paddle/cinn/frontend/pass/pass_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_FRONTEND_PASS_PASS_TEST_HELPER_H_
#define PADDLE_CINN_FRONTEND_PASS_PASS_TEST_HELPER_H_

#include <gflags/gflags.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -240,3 +243,5 @@ inline bool CompareProgramPassResult(

} // namespace frontend
} // namespace cinn

#endif // PADDLE_CINN_FRONTEND_PASS_PASS_TEST_HELPER_H_
5 changes: 5 additions & 0 deletions paddle/cinn/frontend/pass/transpose_folding_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_FRONTEND_PASS_TRANSPOSE_FOLDING_BASE_H_
#define PADDLE_CINN_FRONTEND_PASS_TRANSPOSE_FOLDING_BASE_H_

#include <absl/container/flat_hash_map.h>

#include <sstream>
Expand Down Expand Up @@ -228,3 +231,5 @@ class TransposeFoldingBase : public ProgramPass {
};

} // namespace cinn::frontend::pass

#endif // PADDLE_CINN_FRONTEND_PASS_TRANSPOSE_FOLDING_BASE_H_
1 change: 1 addition & 0 deletions paddle/cinn/hlir/op/contrib/logical_right_shift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "paddle/cinn/hlir/framework/node.h"
#include "paddle/cinn/hlir/framework/op.h"
#include "paddle/cinn/hlir/framework/op_strategy.h"
#include "paddle/cinn/hlir/op/contrib/logical_right_shift.h"
#include "paddle/cinn/hlir/op/op_util.h"
#include "paddle/cinn/hlir/pe/ir_schedule_pe.h"
#include "paddle/cinn/hlir/pe/nn.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/cinn/hlir/op/contrib/reciprocal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "paddle/cinn/hlir/framework/node.h"
#include "paddle/cinn/hlir/framework/op.h"
#include "paddle/cinn/hlir/framework/op_strategy.h"
#include "paddle/cinn/hlir/op/contrib/reciprocal.h"
#include "paddle/cinn/hlir/op/op_util.h"
#include "paddle/cinn/hlir/pe/ir_schedule_pe.h"
#include "paddle/cinn/hlir/pe/nn.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/hlir/op/custom_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "paddle/cinn/utils/string.h"

#ifdef CINN_WITH_CUDNN
#include "cudnn.h"
#include <cudnn.h>
#endif

namespace cinn {
Expand Down
1 change: 0 additions & 1 deletion paddle/cinn/hlir/op/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "paddle/cinn/hlir/pe/ir_schedule_pe.h"
#include "paddle/cinn/hlir/pe/nn.h"
#include "paddle/cinn/hlir/pe/schedule.h"
#include "paddle/cinn/hlir/pe/transform.h"
#include "paddle/cinn/ir/ir_printer.h"
#include "paddle/cinn/utils/string.h"

Expand Down
5 changes: 5 additions & 0 deletions paddle/cinn/hlir/pass/infershape.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_HLIR_PASS_INFERSHAPE_H_
#define PADDLE_CINN_HLIR_PASS_INFERSHAPE_H_

#include "paddle/cinn/common/graph_utils.h"
#include "paddle/cinn/hlir/framework/graph.h"
#include "paddle/cinn/hlir/framework/pass.h"
Expand All @@ -28,3 +31,5 @@ void InferShape(
} // namespace pass
} // namespace hlir
} // namespace cinn

#endif // PADDLE_CINN_HLIR_PASS_INFERSHAPE_H_
5 changes: 5 additions & 0 deletions paddle/cinn/poly/domain_add_unit_loop_mutator.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_POLY_DOMAIN_ADD_UNIT_LOOP_MUTATOR_H_
#define PADDLE_CINN_POLY_DOMAIN_ADD_UNIT_LOOP_MUTATOR_H_

#include <tuple>
#include <vector>

Expand Down Expand Up @@ -50,3 +53,5 @@ class DomainAddUnitLoopMutator : public ir::IRMutator<> {

} // namespace poly
} // namespace cinn

#endif // PADDLE_CINN_POLY_DOMAIN_ADD_UNIT_LOOP_MUTATOR_H_
2 changes: 1 addition & 1 deletion paddle/cinn/runtime/cpu/mkldnn_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "paddle/cinn/runtime/cinn_runtime.h"

#ifdef CINN_WITH_MKLDNN
#include "dnnl.hpp"
#include <dnnl.hpp>
#endif

// define some C APIs
Expand Down
5 changes: 5 additions & 0 deletions paddle/cinn/runtime/cuda/test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PADDLE_CINN_RUNTIME_CUDA_TEST_UTIL_H_
#define PADDLE_CINN_RUNTIME_CUDA_TEST_UTIL_H_

#include <numeric>
#include <vector>

Expand Down Expand Up @@ -54,3 +57,5 @@ class Vector {
} // namespace cuda
} // namespace runtime
} // namespace cinn

#endif // PADDLE_CINN_RUNTIME_CUDA_TEST_UTIL_H_
2 changes: 1 addition & 1 deletion paddle/cinn/runtime/tiny_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <thread>
#include <vector>

#include "cinn_runtime.h"
#include "paddle/cinn/runtime/cinn_runtime.h"

extern "C" {
int max_num_workers = std::thread::hardware_concurrency();
Expand Down