Skip to content

Commit

Permalink
[CodeStyle][CINN] fix cpplint codestyle [build/include_order] `[bui…
Browse files Browse the repository at this point in the history
…ld/header_guard]` `[build/include_subdir]` `[build/include]` (#55085)

* fix cpplint

* fix

* part 1, [build/include_order]

* Revert "part 1, [build/include_order]"

This reverts commit 5d7f969.

* skip, [build/include_order]

---------

Co-authored-by: SigureMo <[email protected]>
  • Loading branch information
enkilee and SigureMo authored Jul 4, 2023
1 parent 987d94a commit fb15191
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 12 deletions.
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 @@ -15,7 +15,7 @@
#include "paddle/cinn/backends/nvrtc/header_generator.h"

#include "glog/logging.h"
#include "jitify.hpp"
#include "jitify.hpp" // NOLINT

namespace cinn {
namespace backends {
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
1 change: 1 addition & 0 deletions paddle/cinn/frontend/computation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#include <iostream>

#include "paddle/cinn/frontend/net_builder.h"
Expand Down
2 changes: 2 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,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

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

Expand Down
2 changes: 2 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,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <absl/container/flat_hash_map.h>

#include <sstream>
Expand Down
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
2 changes: 2 additions & 0 deletions paddle/cinn/hlir/pass/infershape.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "paddle/cinn/common/graph_utils.h"
#include "paddle/cinn/hlir/framework/graph.h"
#include "paddle/cinn/hlir/framework/pass.h"
Expand Down
2 changes: 2 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,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <tuple>
#include <vector>

Expand Down
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" // NOLINT
#endif

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

#pragma once
#include <numeric>
#include <vector>

Expand Down
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

0 comments on commit fb15191

Please sign in to comment.