Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
403b127b
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
403b127b
编写于
6月 14, 2022
作者:
S
Sing_chan
提交者:
GitHub
6月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【code format check upgrade】 step3:enable clang-format sort these infrt files's headers (#43333)
上级
d14e3698
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
20 addition
and
42 deletion
+20
-42
paddle/fluid/operators/fused/fused_multi_transformer_op.cu
paddle/fluid/operators/fused/fused_multi_transformer_op.cu
+5
-9
paddle/infrt/api/infrt_api.cc
paddle/infrt/api/infrt_api.cc
+2
-6
paddle/infrt/dialect/dense_tensor.h
paddle/infrt/dialect/dense_tensor.h
+1
-4
paddle/infrt/dialect/phi/ir/infrt_phi_tensor.h
paddle/infrt/dialect/phi/ir/infrt_phi_tensor.h
+1
-4
paddle/infrt/dialect/phi/pass/kernel_op_desc_test.cc
paddle/infrt/dialect/phi/pass/kernel_op_desc_test.cc
+3
-3
paddle/infrt/dialect/tensorrt/trt_exec.cc
paddle/infrt/dialect/tensorrt/trt_exec.cc
+1
-6
paddle/infrt/dialect/tensorrt/trt_ops.cc
paddle/infrt/dialect/tensorrt/trt_ops.cc
+3
-4
paddle/infrt/kernel/tensorrt/trt_kernels.cc
paddle/infrt/kernel/tensorrt/trt_kernels.cc
+4
-6
未找到文件。
paddle/fluid/operators/fused/fused_multi_transformer_op.cu
浏览文件 @
403b127b
...
...
@@ -16,29 +16,25 @@ limitations under the License. */
// https://github.com/NVIDIA/FasterTransformer/blob/v4.0/fastertransformer/cuda/masked_multihead_attention.cu
// We add License in the head.
// headers sort by clang-format may cause compiling error or test faiure,
// see https://github.com/PaddlePaddle/Paddle/pull/42840/
// clang-format off
#include <cuda_fp16.h>
#include <float.h>
#include <cub/cub.cuh>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/operator.h"
#include "paddle/fluid/platform/device/gpu/gpu_device_function.h"
#include "paddle/fluid/platform/device/gpu/gpu_dnn.h"
#include "paddle/phi/kernels/funcs/math_function.h"
#include "paddle/fluid/operators/fused/attention_layer_norm.h"
#include "paddle/fluid/operators/fused/attn_gemm.h"
#include "paddle/fluid/operators/fused/fmha_ref.h"
#include "paddle/fluid/operators/fused/fused_dropout_helper.h"
#include "paddle/fluid/platform/device/gpu/gpu_device_function.h"
#include "paddle/fluid/platform/device/gpu/gpu_dnn.h"
#include "paddle/phi/kernels/funcs/math_function.h"
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)
#include "paddle/fluid/platform/collective_helper.h"
#include "paddle/fluid/platform/device/gpu/nccl_helper.h"
#endif
// clang-format on
namespace
paddle
{
namespace
operators
{
...
...
paddle/infrt/api/infrt_api.cc
浏览文件 @
403b127b
...
...
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// clang-format off
#include "paddle/infrt/api/infrt_api.h"
#include <llvm/ADT/SmallVector.h>
...
...
@@ -31,6 +30,7 @@
#include "paddle/infrt/dialect/dense_tensor.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/infrt/pass/infrt_op_fuse_pass.h"
#include "paddle/infrt/dialect/infrt/pass/infrt_weights_unfold_pass.h"
#include "paddle/infrt/dialect/mlir_loader.h"
#include "paddle/infrt/dialect/phi/ir/phi_base.h"
#include "paddle/infrt/dialect/phi/pass/phi_op_convert_pass.h"
...
...
@@ -51,18 +51,14 @@
#include "paddle/infrt/kernel/test_kernels.h"
#include "paddle/infrt/tensor/tensor_map.h"
#include "paddle/infrt/dialect/infrt/pass/infrt_weights_unfold_pass.h"
#if defined(INFRT_WITH_GPU) && defined(INFRT_WITH_TRT)
#include "paddle/infrt/kernel/tensorrt/registry.h"
#include "paddle/infrt/dialect/tensorrt/trt_graph_fuse_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_graph_split_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_op_converter_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_op_teller_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_type_convert_pass.h"
#include "paddle/infrt/kernel/tensorrt/registry.h"
#endif
// clang-format on
using
namespace
infrt
::
host_context
;
// NOLINT
using
namespace
infrt
::
tensor
;
// NOLINT
...
...
paddle/infrt/dialect/dense_tensor.h
浏览文件 @
403b127b
...
...
@@ -14,17 +14,14 @@
#pragma once
// clang-format off
#include <mlir/IR/Dialect.h>
#include <mlir/IR/OpDefinition.h>
#include <mlir/Interfaces/SideEffectInterfaces.h>
#include <string>
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/dense_tensor_dialect.hpp.inc"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#define GET_OP_CLASSES
#include "paddle/infrt/dialect/dense_tensor.hpp.inc"
// clang-format on
paddle/infrt/dialect/phi/ir/infrt_phi_tensor.h
浏览文件 @
403b127b
...
...
@@ -14,7 +14,6 @@
#pragma once
// clang-format off
#include <mlir/Dialect/Traits.h>
#include <mlir/IR/Attributes.h>
#include <mlir/IR/Builders.h>
...
...
@@ -30,12 +29,10 @@
#include <mlir/Interfaces/LoopLikeInterface.h>
#include <mlir/Interfaces/SideEffectInterfaces.h>
#include "paddle/infrt/dialect/dense_tensor.h"
#include "paddle/infrt/dialect/phi/ir/infrt_phi_tensorDialect.h.inc"
#include "paddle/infrt/dialect/phi/ir/infrt_phi_tensorTypes.h.inc"
#include "paddle/infrt/dialect/dense_tensor.h"
#include "paddle/infrt/dialect/phi/ir/phi_base.h"
// NOLINT
#define GET_OP_CLASSES
#include "paddle/infrt/dialect/phi/ir/infrt_phi_tensor.h.inc"
// clang-format on
paddle/infrt/dialect/phi/pass/kernel_op_desc_test.cc
浏览文件 @
403b127b
...
...
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// clang-format off
#include "paddle/infrt/dialect/phi/pass/kernel_op_desc.h"
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <vector>
#include "paddle/infrt/dialect/phi/pass/kernel_op_desc.h"
#include "paddle/phi/kernels/declarations.h"
// clang-format on
namespace
infrt
{
...
...
paddle/infrt/dialect/tensorrt/trt_exec.cc
浏览文件 @
403b127b
...
...
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// clang-format off
#include <llvm/Support/CommandLine.h>
#include <mlir/Pass/PassManager.h>
...
...
@@ -27,18 +26,15 @@
#include "paddle/infrt/dialect/tensorrt/trt_op_converter_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_op_teller_pass.h"
#include "paddle/infrt/dialect/tensorrt/trt_type_convert_pass.h"
#include "paddle/infrt/host_context/core_runtime.h"
#include "paddle/infrt/host_context/kernel_registry.h"
#include "paddle/infrt/host_context/mlir_to_runtime_translate.h"
#include "paddle/infrt/kernel/basic_kernels.h"
#include "paddle/infrt/kernel/control_flow_kernels.h"
#include "paddle/infrt/kernel/tensor_kernels.h"
#include "paddle/infrt/kernel/tensor_shape_kernels.h"
#include "paddle/infrt/kernel/test_kernels.h"
#include "paddle/infrt/kernel/tensorrt/registry.h"
#include "paddle/infrt/kernel/test_kernels.h"
#ifdef INFRT_WITH_PHI
#include "paddle/infrt/dialect/infrt/pass/infrt_op_fuse_pass.h"
...
...
@@ -48,7 +44,6 @@
#endif
#include <mlir/Transforms/Passes.h>
// clang-format on
int
main
(
int
argc
,
char
**
argv
)
{
static
llvm
::
cl
::
opt
<
std
::
string
>
input_file
(
...
...
paddle/infrt/dialect/tensorrt/trt_ops.cc
浏览文件 @
403b127b
...
...
@@ -12,21 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// clang-format off
#include "paddle/infrt/dialect/tensorrt/trt_ops.h"
#include <mlir/IR/DialectImplementation.h>
#include <mlir/IR/Matchers.h>
#include <mlir/IR/OpImplementation.h>
#include <mlir/IR/PatternMatch.h>
#include <mlir/Interfaces/CallInterfaces.h>
#include <mlir/Interfaces/SideEffectInterfaces.h>
#include "paddle/infrt/common/global.h"
#include "paddle/infrt/dialect/tensorrt/trt_dialect_types.h"
#include "paddle/infrt/common/global.h"
#include "paddle/infrt/dialect/dense_tensor.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/phi/ir/phi_base.h"
// clang-format on
#include "paddle/infrt/dialect/tensorrt/trt_dialect_types.h"
namespace
infrt
{
namespace
trt
{
...
...
paddle/infrt/kernel/tensorrt/trt_kernels.cc
浏览文件 @
403b127b
...
...
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// clang-format off
#include "paddle/infrt/kernel/tensorrt/trt_kernels.h"
#include <string>
#include <unordered_set>
#include "NvInfer.h"
#include "NvInferRuntime.h"
#include "NvInferRuntimeCommon.h"
...
...
@@ -27,17 +28,14 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Value.h"
#include "paddle/infrt/kernel/tensorrt/trt_helper.h"
#include "paddle/infrt/kernel/tensorrt/trt_layers.h"
#include "paddle/infrt/backends/tensorrt/trt_engine.h"
#include "paddle/infrt/backends/tensorrt/trt_options.h"
#include "paddle/infrt/dialect/tensorrt/trt_ops.h"
#include "paddle/infrt/host_context/symbol_table.h"
#include "paddle/infrt/kernel/tensorrt/trt_helper.h"
#include "paddle/infrt/kernel/tensorrt/trt_layers.h"
#include "paddle/phi/common/place.h"
#include "paddle/phi/core/dense_tensor.h"
// clang-format on
namespace
infrt
{
namespace
kernel
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录