Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
3a256637
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3a256637
编写于
3月 17, 2022
作者:
王
王明冬
提交者:
GitHub
3月 17, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[infrt] move pd dialect position. test=develop (#40616)
上级
6849d33b
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
74 addition
and
13 deletion
+74
-13
paddle/infrt/dialect/CMakeLists.txt
paddle/infrt/dialect/CMakeLists.txt
+1
-1
paddle/infrt/dialect/infrt/pass/infrt_op_fuse_pass.cc
paddle/infrt/dialect/infrt/pass/infrt_op_fuse_pass.cc
+1
-1
paddle/infrt/dialect/init_dialects.cc
paddle/infrt/dialect/init_dialects.cc
+1
-1
paddle/infrt/dialect/pd/CMakeLists.txt
paddle/infrt/dialect/pd/CMakeLists.txt
+3
-0
paddle/infrt/dialect/pd/common/CMakeLists.txt
paddle/infrt/dialect/pd/common/CMakeLists.txt
+4
-0
paddle/infrt/dialect/pd/ir/CMakeLists.txt
paddle/infrt/dialect/pd/ir/CMakeLists.txt
+5
-0
paddle/infrt/dialect/pd/ir/pd_ops.cc
paddle/infrt/dialect/pd/ir/pd_ops.cc
+1
-1
paddle/infrt/dialect/pd/ir/pd_ops.h
paddle/infrt/dialect/pd/ir/pd_ops.h
+0
-0
paddle/infrt/dialect/pd/pass/CMakeLists.txt
paddle/infrt/dialect/pd/pass/CMakeLists.txt
+5
-0
paddle/infrt/dialect/pd/pass/pd_op_fuse_pass.cc
paddle/infrt/dialect/pd/pass/pd_op_fuse_pass.cc
+43
-0
paddle/infrt/dialect/phi/pass/proto_arg_map_context.h
paddle/infrt/dialect/phi/pass/proto_arg_map_context.h
+1
-1
paddle/infrt/dialect/tensorrt/trt_graph_fuse_pass.cc
paddle/infrt/dialect/tensorrt/trt_graph_fuse_pass.cc
+2
-1
paddle/infrt/dialect/tensorrt/trt_graph_split_pass.cc
paddle/infrt/dialect/tensorrt/trt_graph_split_pass.cc
+1
-1
paddle/infrt/dialect/tensorrt/trt_op_converter_pass.cc
paddle/infrt/dialect/tensorrt/trt_op_converter_pass.cc
+1
-1
paddle/infrt/dialect/tensorrt/trt_op_teller_pass.cc
paddle/infrt/dialect/tensorrt/trt_op_teller_pass.cc
+1
-1
paddle/infrt/dialect/tensorrt/trt_ops.h
paddle/infrt/dialect/tensorrt/trt_ops.h
+1
-1
paddle/infrt/host_context/paddle_mlir.cc
paddle/infrt/host_context/paddle_mlir.cc
+1
-1
paddle/infrt/host_context/paddle_mlir.h
paddle/infrt/host_context/paddle_mlir.h
+1
-1
tools/infrt/generate_pd_op_dialect_from_paddle_op_maker.py
tools/infrt/generate_pd_op_dialect_from_paddle_op_maker.py
+1
-1
未找到文件。
paddle/infrt/dialect/CMakeLists.txt
浏览文件 @
3a256637
...
...
@@ -7,7 +7,6 @@ gather_srcs(infrt_src SRCS
dense_tensor.cc
mlir_loader.cc
diagnostic_utils.cc
pd_ops.cc
)
mlir_tablegen_on
(
tensor_shape DIALECT ts
)
...
...
@@ -28,6 +27,7 @@ add_dependencies(print-ir pd_ops_inc)
cc_test_tiny
(
test_infrt_mlir_loader SRCS mlir_loader_test.cc DEPS infrt
${
MLIR_IR_LIBS
}
)
add_subdirectory
(
infrt
)
add_subdirectory
(
pd
)
add_subdirectory
(
tensorrt
)
if
(
INFRT_WITH_PHI
)
...
...
paddle/infrt/dialect/infrt/pass/infrt_op_fuse_pass.cc
浏览文件 @
3a256637
...
...
@@ -16,7 +16,7 @@
#include <mlir/Transforms/GreedyPatternRewriteDriver.h>
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
namespace
{
#include "paddle/infrt/dialect/infrt/pass/infrt_op_fuse.cpp.inc" // NOLINT
...
...
paddle/infrt/dialect/init_dialects.cc
浏览文件 @
3a256637
...
...
@@ -20,7 +20,7 @@
#include "paddle/infrt/dialect/infrt/ir/basic_kernels.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
#include "paddle/infrt/dialect/phi/ir/infrt_phi_tensor.h"
#include "paddle/infrt/dialect/phi/ir/phi_base.h"
#include "paddle/infrt/dialect/phi/ir/phi_kernels.h"
...
...
paddle/infrt/dialect/pd/CMakeLists.txt
0 → 100644
浏览文件 @
3a256637
add_subdirectory
(
common
)
add_subdirectory
(
ir
)
add_subdirectory
(
pass
)
paddle/infrt/dialect/pd/common/CMakeLists.txt
0 → 100644
浏览文件 @
3a256637
core_gather_headers
()
gather_srcs
(
infrt_src SRCS
)
paddle/infrt/dialect/pd/ir/CMakeLists.txt
0 → 100644
浏览文件 @
3a256637
core_gather_headers
()
gather_srcs
(
infrt_src SRCS
pd_ops.cc
)
paddle/infrt/dialect/pd_ops.cc
→
paddle/infrt/dialect/pd
/ir/pd
_ops.cc
浏览文件 @
3a256637
...
...
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
#include <mlir/IR/Matchers.h>
#include <mlir/IR/PatternMatch.h>
...
...
paddle/infrt/dialect/pd_ops.h
→
paddle/infrt/dialect/pd
/ir/pd
_ops.h
浏览文件 @
3a256637
文件已移动
paddle/infrt/dialect/pd/pass/CMakeLists.txt
0 → 100644
浏览文件 @
3a256637
core_gather_headers
()
gather_srcs
(
infrt_src SRCS
pd_op_fuse_pass.cc
)
paddle/infrt/dialect/pd/pass/pd_op_fuse_pass.cc
0 → 100644
浏览文件 @
3a256637
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <mlir/Pass/Pass.h>
#include <mlir/Transforms/GreedyPatternRewriteDriver.h>
#include "paddle/infrt/dialect/pd/ir/pd_ops.h"
namespace
{
#include "paddle/infrt/dialect/rewrite.cpp.inc" // NOLINT
/*
* PdOpFusePass.
*/
struct
PdOpFusePass
:
public
mlir
::
PassWrapper
<
PdOpFusePass
,
mlir
::
FunctionPass
>
{
public:
::
llvm
::
StringRef
getName
()
const
override
{
return
"PdOpFusePass"
;
}
llvm
::
StringRef
getArgument
()
const
override
{
return
"pd-op-fuse"
;
}
void
runOnFunction
()
override
;
};
// Implementation of the PdOpFusePass.
void
PdOpFusePass
::
runOnFunction
()
{
::
mlir
::
RewritePatternSet
patterns
(
&
getContext
());
populateWithGenerated
(
patterns
);
(
void
)
applyPatternsAndFoldGreedily
(
getOperation
(),
std
::
move
(
patterns
));
}
}
// namespace
mlir
::
PassRegistration
<
PdOpFusePass
>
infrt_op_fuse_pass
;
paddle/infrt/dialect/phi/pass/proto_arg_map_context.h
浏览文件 @
3a256637
...
...
@@ -16,7 +16,7 @@ limitations under the License. */
#include <mlir/IR/Operation.h>
#include <unordered_map>
#include "paddle/infrt/dialect/pd_ops_info.h"
#include "paddle/infrt/dialect/pd
/common/pd
_ops_info.h"
#include "paddle/phi/core/compat/arg_map_context.h"
namespace
infrt
{
...
...
paddle/infrt/dialect/tensorrt/trt_graph_fuse_pass.cc
浏览文件 @
3a256637
...
...
@@ -17,11 +17,12 @@
#include <llvm/ADT/SetVector.h>
#include <mlir/Analysis/SliceAnalysis.h>
#include <mlir/IR/Builders.h>
#include <paddle/infrt/dialect/pd_ops.h>
#include <list>
#include <unordered_set>
#include <vector>
#include "paddle/infrt/dialect/pd/ir/pd_ops.h"
namespace
infrt
{
namespace
trt
{
namespace
{
...
...
paddle/infrt/dialect/tensorrt/trt_graph_split_pass.cc
浏览文件 @
3a256637
...
...
@@ -15,7 +15,7 @@
#include "paddle/infrt/dialect/tensorrt/trt_graph_split_pass.h"
#include <mlir/IR/Builders.h>
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
namespace
infrt
{
namespace
trt
{
...
...
paddle/infrt/dialect/tensorrt/trt_op_converter_pass.cc
浏览文件 @
3a256637
...
...
@@ -14,7 +14,7 @@
#include "paddle/infrt/dialect/tensorrt/trt_op_converter_pass.h"
#include <mlir/IR/Builders.h>
#include <mlir/Transforms/DialectConversion.h>
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
#include "paddle/infrt/dialect/tensorrt/trt_dialect_types.h"
namespace
infrt
{
...
...
paddle/infrt/dialect/tensorrt/trt_op_teller_pass.cc
浏览文件 @
3a256637
...
...
@@ -17,7 +17,7 @@
#include <mlir/IR/Builders.h>
#include "paddle/infrt/dialect/infrt/ir/basic_kernels.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
namespace
infrt
{
namespace
trt
{
...
...
paddle/infrt/dialect/tensorrt/trt_ops.h
浏览文件 @
3a256637
...
...
@@ -30,7 +30,7 @@
#include <mlir/Interfaces/SideEffectInterfaces.h>
#include "paddle/infrt/dialect/infrt/ir/basic_kernels.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
namespace
infrt
{
namespace
trt
{
...
...
paddle/infrt/host_context/paddle_mlir.cc
浏览文件 @
3a256637
...
...
@@ -15,7 +15,7 @@
#include "paddle/infrt/host_context/paddle_mlir.h"
#include "paddle/infrt/dialect/infrt/ir/basic_kernels.h"
#include "paddle/infrt/dialect/infrt/ir/infrt_dialect.h"
#include "paddle/infrt/dialect/pd_ops_info.h"
#include "paddle/infrt/dialect/pd
/common/pd
_ops_info.h"
MLIRModelGenImpl
::
MLIRModelGenImpl
()
:
context_
(
infrt
::
Global
::
getMLIRContext
()),
builder_
(
context_
)
{
...
...
paddle/infrt/host_context/paddle_mlir.h
浏览文件 @
3a256637
...
...
@@ -29,7 +29,7 @@
#include "paddle/infrt/dialect/infrt/ir/basic_kernels.h"
#include "paddle/infrt/dialect/init_dialects.h"
#include "paddle/infrt/dialect/pd_ops.h"
#include "paddle/infrt/dialect/pd
/ir/pd
_ops.h"
#include "paddle/infrt/dialect/tensor_shape.h"
#include "paddle/infrt/paddle/model_parser.h"
...
...
tools/infrt/generate_pd_op_dialect_from_paddle_op_maker.py
浏览文件 @
3a256637
...
...
@@ -186,7 +186,7 @@ def generate_all_ops_inputs_outputs_map(op_descs):
cpp_style_ops_outputs_map_str
=
start_
+
ops_outputs_str
+
"
\n
};"
# 3. Write to header file
dst_head_file
=
"../../paddle/infrt/dialect/pd_ops_info.h"
dst_head_file
=
"../../paddle/infrt/dialect/pd
/common/pd
_ops_info.h"
with
open
(
dst_head_file
,
'w'
)
as
ops_inputs_outputs_head_file
:
ops_inputs_outputs_head_file
.
write
(
cpp_style_ops_inputs_map_str
)
ops_inputs_outputs_head_file
.
write
(
"
\n\n
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录