Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
329e768b
P
Paddle
项目概览
机器未来
/
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看板
提交
329e768b
编写于
6月 24, 2019
作者:
C
Chunwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support deployment
上级
92002ebe
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
141 addition
and
77 deletion
+141
-77
.gitlab-ci.yml
.gitlab-ci.yml
+13
-12
paddle/fluid/inference/analysis/passes/CMakeLists.txt
paddle/fluid/inference/analysis/passes/CMakeLists.txt
+1
-1
paddle/fluid/inference/analysis/passes/paddle_use_passes.cc
paddle/fluid/inference/analysis/passes/paddle_use_passes.cc
+0
-0
paddle/fluid/lite/CMakeLists.txt
paddle/fluid/lite/CMakeLists.txt
+30
-0
paddle/fluid/lite/api/CMakeLists.txt
paddle/fluid/lite/api/CMakeLists.txt
+6
-3
paddle/fluid/lite/api/apis_test.cc
paddle/fluid/lite/api/apis_test.cc
+3
-3
paddle/fluid/lite/api/cxx_api_bin.cc
paddle/fluid/lite/api/cxx_api_bin.cc
+1
-1
paddle/fluid/lite/api/cxx_api_test.cc
paddle/fluid/lite/api/cxx_api_test.cc
+3
-3
paddle/fluid/lite/api/inceptionv4_test.cc
paddle/fluid/lite/api/inceptionv4_test.cc
+3
-3
paddle/fluid/lite/api/light_api_test.cc
paddle/fluid/lite/api/light_api_test.cc
+3
-3
paddle/fluid/lite/api/mobilenetv1_test.cc
paddle/fluid/lite/api/mobilenetv1_test.cc
+3
-3
paddle/fluid/lite/api/mobilenetv2_test.cc
paddle/fluid/lite/api/mobilenetv2_test.cc
+3
-3
paddle/fluid/lite/api/paddle_api.h
paddle/fluid/lite/api/paddle_api.h
+1
-1
paddle/fluid/lite/api/paddle_api_test.cc
paddle/fluid/lite/api/paddle_api_test.cc
+4
-3
paddle/fluid/lite/api/paddle_lite_factory_helper.h
paddle/fluid/lite/api/paddle_lite_factory_helper.h
+37
-0
paddle/fluid/lite/api/paddle_place.cc
paddle/fluid/lite/api/paddle_place.cc
+1
-1
paddle/fluid/lite/api/paddle_place.h
paddle/fluid/lite/api/paddle_place.h
+0
-0
paddle/fluid/lite/api/paddle_use_kernels.h
paddle/fluid/lite/api/paddle_use_kernels.h
+2
-1
paddle/fluid/lite/api/paddle_use_ops.h
paddle/fluid/lite/api/paddle_use_ops.h
+1
-1
paddle/fluid/lite/api/paddle_use_passes.h
paddle/fluid/lite/api/paddle_use_passes.h
+1
-1
paddle/fluid/lite/api/resnet50_test.cc
paddle/fluid/lite/api/resnet50_test.cc
+3
-3
paddle/fluid/lite/api/test_googlenet_lite.cc
paddle/fluid/lite/api/test_googlenet_lite.cc
+3
-3
paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_activation_fuse_pass_test.cc
.../fusion/conv_elementwise_add_activation_fuse_pass_test.cc
+1
-1
paddle/fluid/lite/core/mir/fusion/elementwise_add_activation_fuse_pass_test.cc
...e/mir/fusion/elementwise_add_activation_fuse_pass_test.cc
+1
-1
paddle/fluid/lite/core/mir/fusion/fc_fuse_pass_test.cc
paddle/fluid/lite/core/mir/fusion/fc_fuse_pass_test.cc
+1
-1
paddle/fluid/lite/core/mir/pass_registry.h
paddle/fluid/lite/core/mir/pass_registry.h
+1
-5
paddle/fluid/lite/core/mir/ssa_graph_test.cc
paddle/fluid/lite/core/mir/ssa_graph_test.cc
+1
-1
paddle/fluid/lite/core/mir/variable_place_inference_pass_test.cc
...fluid/lite/core/mir/variable_place_inference_pass_test.cc
+1
-1
paddle/fluid/lite/core/op_registry.h
paddle/fluid/lite/core/op_registry.h
+1
-13
paddle/fluid/lite/core/optimizer_test.cc
paddle/fluid/lite/core/optimizer_test.cc
+1
-1
paddle/fluid/lite/core/target_wrapper.h
paddle/fluid/lite/core/target_wrapper.h
+1
-1
paddle/fluid/lite/tools/build.sh
paddle/fluid/lite/tools/build.sh
+7
-0
paddle/fluid/lite/tools/debug/model_debug_tool.cc
paddle/fluid/lite/tools/debug/model_debug_tool.cc
+3
-3
未找到文件。
.gitlab-ci.yml
浏览文件 @
329e768b
...
...
@@ -109,15 +109,15 @@ build:mobile_armlinux:
-
build:server
build:mobile_model_
mobilenetv1
:
build:mobile_model_
resnet50
:
tags
:
-
lite
stage
:
build_mobile
image
:
$MOBILE_LITE_DOCKER_IMAGE
script
:
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_
mobilenetv1
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_
mobilenetv1
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_
resnet50
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_
resnet50
dependencies
:
-
build:server
...
...
@@ -127,17 +127,18 @@ build:mobile_model_mobilenetv1:
paths
:
-
build.lite.android.armv8.gcc
-
~/.ccache
-
$CI_PROJECT_DIR/build_mobile_model_
mobilenetv1
-
$CI_PROJECT_DIR/build_mobile_model_
resnet50
build:mobile_model_mobilenetv2:
build:mobile_model_mobilenetv1:
tags
:
-
lite
stage
:
build_mobile
image
:
$MOBILE_LITE_DOCKER_IMAGE
script
:
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_mobilenetv
2
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_mobilenetv
2
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_mobilenetv
1
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_mobilenetv
1
dependencies
:
-
build:server
...
...
@@ -147,17 +148,17 @@ build:mobile_model_mobilenetv2:
paths
:
-
build.lite.android.armv8.gcc
-
~/.ccache
-
$CI_PROJECT_DIR/build_mobile_model_mobilenetv
2
-
$CI_PROJECT_DIR/build_mobile_model_mobilenetv
1
build:mobile_model_
resnet50
:
build:mobile_model_
mobilenetv2
:
tags
:
-
lite
stage
:
build_mobile
image
:
$MOBILE_LITE_DOCKER_IMAGE
script
:
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_
resnet50
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_
resnet50
-
export CCACHE_DIR=$CI_PROJECT_DIR/build_mobile_model_
mobilenetv2
-
./paddle/fluid/lite/tools/build.sh build_test_arm_model_
mobilenetv2
dependencies
:
-
build:server
...
...
@@ -167,7 +168,7 @@ build:mobile_model_resnet50:
paths
:
-
build.lite.android.armv8.gcc
-
~/.ccache
-
$CI_PROJECT_DIR/build_mobile_model_
resnet50
-
$CI_PROJECT_DIR/build_mobile_model_
mobilenetv2
#build:mobile_model_inceptionv4:
# tags:
...
...
paddle/fluid/inference/analysis/passes/CMakeLists.txt
浏览文件 @
329e768b
...
...
@@ -5,7 +5,7 @@ cc_library(ir_params_sync_among_devices_pass SRCS ir_params_sync_among_devices_p
cc_library
(
ir_graph_to_program_pass SRCS ir_graph_to_program_pass.cc DEPS analysis_pass graph_to_program_pass
)
cc_library
(
adjust_cudnn_workspace_size_pass SRCS adjust_cudnn_workspace_size_pass.cc DEPS analysis_pass graph_to_program_pass
)
cc_library
(
analysis_passes SRCS use_passes.cc DEPS
cc_library
(
analysis_passes SRCS
paddle_
use_passes.cc DEPS
ir_graph_build_pass
ir_analysis_pass
ir_params_sync_among_devices_pass
...
...
paddle/fluid/inference/analysis/passes/use_passes.cc
→
paddle/fluid/inference/analysis/passes/
paddle_
use_passes.cc
浏览文件 @
329e768b
文件已移动
paddle/fluid/lite/CMakeLists.txt
浏览文件 @
329e768b
...
...
@@ -208,3 +208,33 @@ if (WITH_TESTING)
lite_download_and_uncompress
(
${
LITE_MODEL_DIR
}
${
LITE_URL
}
"GoogleNet_inference.tar.gz"
)
endif
()
endif
()
# for publish
set
(
INFER_LITE_PUBLISH_ROOT
"
${
CMAKE_BINARY_DIR
}
/inference_lite_lib"
CACHE STRING
"inference publish path"
)
message
(
STATUS
"publish inference lib to
${
INFER_LITE_PUBLISH_ROOT
}
"
)
# The final target for publish lite lib
add_custom_target
(
publish_inference_lite
)
#cc_library(inference_cxx_lib DEPS cxx_api_lite)
add_custom_target
(
publish_inference_cxx_lib
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
COMMAND cp
"
${
CMAKE_SOURCE_DIR
}
/paddle/fluid/lite/api/paddle_*.h"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/paddle/fluid/lite/api/libpaddle_api_full.a"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
)
add_dependencies
(
publish_inference_cxx_lib paddle_api_full
)
add_dependencies
(
publish_inference_lite publish_inference_cxx_lib
)
if
(
LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
)
#cc_library(inference_mobile_lib DEPS light_api_lite)
add_custom_target
(
publish_inference_mobile_lib
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/mobile/lib"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/mobile/include"
COMMAND cp
"
${
CMAKE_SOURCE_DIR
}
/paddle/fluid/lite/api/paddle_*.h"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/paddle/fluid/lite/api/libpaddle_api_light.a"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
)
add_dependencies
(
publish_inference_mobile_lib paddle_api_light
)
add_dependencies
(
publish_inference_lite publish_inference_mobile_lib
)
endif
()
paddle/fluid/lite/api/CMakeLists.txt
浏览文件 @
329e768b
...
...
@@ -6,7 +6,7 @@ if(LITE_WITH_CUDA)
nv_test
(
test_cxx_api_lite_cuda SRCS cxx_api_test.cc DEPS cxx_api_lite_cuda
)
endif
()
lite_cc_library
(
place_lite SRCS place.cc DEPS glog
)
lite_cc_library
(
place_lite SRCS p
addle_p
lace.cc DEPS glog
)
lite_cc_library
(
lite_api_test_helper SRCS lite_api_test_helper.cc
DEPS scope_lite optimizer_lite target_wrapper_host model_parser_lite program_lite
...
...
@@ -103,8 +103,11 @@ lite_cc_test(test_apis_lite SRCS apis_test.cc
lite_cc_library
(
cxx_api_impl_lite SRCS cxx_api_impl.cc DEPS cxx_api_lite
)
lite_cc_library
(
light_api_impl_lite SRCS light_api_impl.cc DEPS light_api_lite
)
lite_cc_library
(
paddle_api_lite SRCS paddle_api.cc DEPS cxx_api_impl_lite light_api_impl_lite
)
lite_cc_test
(
test_paddle_api_lite SRCS paddle_api_test.cc DEPS cxx_api_lite light_api_lite paddle_api_lite
lite_cc_library
(
paddle_api_full SRCS paddle_api.cc DEPS cxx_api_impl_lite light_api_impl_lite
)
lite_cc_library
(
paddle_api_light SRCS paddle_api.cc DEPS light_api_impl_lite
)
lite_cc_test
(
test_paddle_api_lite SRCS paddle_api_test.cc DEPS cxx_api_lite light_api_lite paddle_api_full
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/lite_naive_model SERIAL
)
if
(
WITH_TESTING
)
add_dependencies
(
test_paddle_api_lite test_apis_lite
)
...
...
paddle/fluid/lite/api/apis_test.cc
浏览文件 @
329e768b
...
...
@@ -20,10 +20,10 @@
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/light_api.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/mir/pass_registry.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
DEFINE_string
(
model_dir
,
""
,
""
);
DEFINE_string
(
optimized_model
,
""
,
""
);
...
...
paddle/fluid/lite/api/cxx_api_bin.cc
浏览文件 @
329e768b
...
...
@@ -14,7 +14,7 @@
#include "paddle/fluid/lite/api/cxx_api.h"
#include <chrono> // NOLINT
#include "paddle/fluid/lite/
core/mir/
use_passes.h"
#include "paddle/fluid/lite/
api/paddle_
use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
namespace
paddle
{
...
...
paddle/fluid/lite/api/cxx_api_test.cc
浏览文件 @
329e768b
...
...
@@ -17,11 +17,11 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/lite_api_test_helper.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
// For training.
DEFINE_string
(
startup_program_path
,
""
,
""
);
...
...
paddle/fluid/lite/api/inceptionv4_test.cc
浏览文件 @
329e768b
...
...
@@ -16,11 +16,11 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/api/test_helper.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
namespace
paddle
{
namespace
lite
{
...
...
paddle/fluid/lite/api/light_api_test.cc
浏览文件 @
329e768b
...
...
@@ -15,9 +15,9 @@
#include "paddle/fluid/lite/api/light_api.h"
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include "paddle/fluid/lite/
core/mir/use_passe
s.h"
#include "paddle/fluid/lite/
kernels/use_kernel
s.h"
#include "paddle/fluid/lite/
operators/use_op
s.h"
#include "paddle/fluid/lite/
api/paddle_use_kernel
s.h"
#include "paddle/fluid/lite/
api/paddle_use_op
s.h"
#include "paddle/fluid/lite/
api/paddle_use_passe
s.h"
DEFINE_string
(
optimized_model
,
""
,
""
);
...
...
paddle/fluid/lite/api/mobilenetv1_test.cc
浏览文件 @
329e768b
...
...
@@ -16,11 +16,11 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/api/test_helper.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
namespace
paddle
{
namespace
lite
{
...
...
paddle/fluid/lite/api/mobilenetv2_test.cc
浏览文件 @
329e768b
...
...
@@ -16,11 +16,11 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/api/test_helper.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
namespace
paddle
{
namespace
lite
{
...
...
paddle/fluid/lite/api/paddle_api.h
浏览文件 @
329e768b
...
...
@@ -22,7 +22,7 @@
#include <memory>
#include <string>
#include <vector>
#include "place.h" // NOLINT
#include "p
addle_p
lace.h" // NOLINT
namespace
paddle
{
namespace
lite_api
{
...
...
paddle/fluid/lite/api/paddle_api_test.cc
浏览文件 @
329e768b
...
...
@@ -14,10 +14,11 @@
#include "paddle/fluid/lite/api/paddle_api.h"
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include "paddle/fluid/lite/
core/mir/use_passe
s.h"
#include "paddle/fluid/lite/
kernels/use_kernel
s.h"
#include "paddle/fluid/lite/
operators/use_op
s.h"
#include "paddle/fluid/lite/
api/paddle_use_kernel
s.h"
#include "paddle/fluid/lite/
api/paddle_use_op
s.h"
#include "paddle/fluid/lite/
api/paddle_use_passe
s.h"
DEFINE_string
(
model_dir
,
""
,
""
);
...
...
paddle/fluid/lite/api/paddle_lite_factory_helper.h
0 → 100644
浏览文件 @
329e768b
// Copyright (c) 2019 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.
/*
* This file defines some MACROS that explicitly determine the op, kernel, mir
* passes used in the inference lib.
*/
#pragma once
#define USE_LITE_OP(op_type__) \
extern int touch_op_##op_type__(); \
int LITE_OP_REGISTER_FAKE(op_type__) __attribute__((unused)) = \
touch_op_##op_type__();
#define USE_LITE_KERNEL(op_type__, target__, precision__, layout__, alias__) \
extern int touch_##op_type__##target__##precision__##layout__##alias__(); \
int op_type__##target__##precision__##layout__##alias__ \
__attribute__((unused)) = \
touch_##op_type__##target__##precision__##layout__##alias__();
#define USE_MIR_PASS(name__) \
extern bool mir_pass_registry##name__##_fake(); \
static bool mir_pass_usage##name__ __attribute__((unused)) = \
mir_pass_registry##name__##_fake();
#define LITE_OP_REGISTER_FAKE(op_type__) op_type__##__registry__
paddle/fluid/lite/api/place.cc
→
paddle/fluid/lite/api/p
addle_p
lace.cc
浏览文件 @
329e768b
...
...
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle/fluid/lite/api/place.h"
#include "paddle/fluid/lite/api/p
addle_p
lace.h"
#include <glog/logging.h>
#include "paddle/fluid/lite/utils/hash.h"
...
...
paddle/fluid/lite/api/place.h
→
paddle/fluid/lite/api/p
addle_p
lace.h
浏览文件 @
329e768b
文件已移动
paddle/fluid/lite/
kernels/
use_kernels.h
→
paddle/fluid/lite/
api/paddle_
use_kernels.h
浏览文件 @
329e768b
...
...
@@ -17,7 +17,7 @@
*/
#pragma once
#include "paddle
/fluid/lite/core/op_registry.h"
#include "paddle
_lite_factory_helper.h" // NOLINT
USE_LITE_KERNEL
(
feed
,
kHost
,
kAny
,
kAny
,
def
);
USE_LITE_KERNEL
(
fetch
,
kHost
,
kAny
,
kAny
,
def
);
...
...
@@ -61,6 +61,7 @@ USE_LITE_KERNEL(mul, kCUDA, kFloat, kNCHW, def);
USE_LITE_KERNEL
(
io_copy
,
kCUDA
,
kAny
,
kAny
,
host_to_device
);
USE_LITE_KERNEL
(
io_copy
,
kCUDA
,
kAny
,
kAny
,
device_to_host
);
#endif
#ifdef LITE_WITH_OPENCL
USE_LITE_KERNEL
(
elementwise_add
,
kOpenCL
,
kFloat
,
kNCHW
,
def
);
#endif
paddle/fluid/lite/
operators/
use_ops.h
→
paddle/fluid/lite/
api/paddle_
use_ops.h
浏览文件 @
329e768b
...
...
@@ -16,7 +16,7 @@
// ATTENTION This can only include in a .cc file.
#include "paddle
/fluid/lite/core/op_registry.h"
#include "paddle
_lite_factory_helper.h" // NOLINT
USE_LITE_OP
(
mul
);
USE_LITE_OP
(
fc
);
...
...
paddle/fluid/lite/
core/mir/
use_passes.h
→
paddle/fluid/lite/
api/paddle_
use_passes.h
浏览文件 @
329e768b
...
...
@@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "paddle
/fluid/lite/core/mir/pass_registry.h"
#include "paddle
_lite_factory_helper.h" // NOLINT
USE_MIR_PASS
(
demo
);
USE_MIR_PASS
(
static_kernel_pick_pass
);
...
...
paddle/fluid/lite/api/resnet50_test.cc
浏览文件 @
329e768b
...
...
@@ -16,11 +16,11 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/api/test_helper.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
namespace
paddle
{
namespace
lite
{
...
...
paddle/fluid/lite/api/test_googlenet_lite.cc
浏览文件 @
329e768b
...
...
@@ -31,11 +31,11 @@
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/lite_api_test_helper.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
// for googlenet
DEFINE_string
(
model_dir
,
""
,
""
);
...
...
paddle/fluid/lite/core/mir/fusion/conv_elementwise_add_activation_fuse_pass_test.cc
浏览文件 @
329e768b
...
...
@@ -18,9 +18,9 @@
#include <vector>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/core/mir/graph_visualize_pass.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/core/program.h"
...
...
paddle/fluid/lite/core/mir/fusion/elementwise_add_activation_fuse_pass_test.cc
浏览文件 @
329e768b
...
...
@@ -18,9 +18,9 @@
#include <vector>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/core/mir/graph_visualize_pass.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/core/program.h"
...
...
paddle/fluid/lite/core/mir/fusion/fc_fuse_pass_test.cc
浏览文件 @
329e768b
...
...
@@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/
core/mir/
use_passes.h"
#include "paddle/fluid/lite/
api/paddle_
use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
DEFINE_string
(
model_dir
,
""
,
""
);
...
...
paddle/fluid/lite/core/mir/pass_registry.h
浏览文件 @
329e768b
...
...
@@ -15,6 +15,7 @@
#pragma once
#include <string>
#include "paddle/fluid/lite/api/paddle_lite_factory_helper.h"
#include "paddle/fluid/lite/core/mir/pass_manager.h"
namespace
paddle
{
...
...
@@ -41,8 +42,3 @@ class PassRegistry {
bool mir_pass_registry##name__##_fake() { \
return mir_pass_registry##name__.Touch(); \
}
#define USE_MIR_PASS(name__) \
extern bool mir_pass_registry##name__##_fake(); \
static bool mir_pass_usage##name__ __attribute__((unused)) = \
mir_pass_registry##name__##_fake();
paddle/fluid/lite/core/mir/ssa_graph_test.cc
浏览文件 @
329e768b
...
...
@@ -16,8 +16,8 @@
#include <gtest/gtest.h>
#include <memory>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/mir/graph_visualize_pass.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/core/program_fake_utils.h"
...
...
paddle/fluid/lite/core/mir/variable_place_inference_pass_test.cc
浏览文件 @
329e768b
...
...
@@ -13,7 +13,7 @@
// limitations under the License.
#include <gtest/gtest.h>
#include "paddle/fluid/lite/
core/mir/
use_passes.h"
#include "paddle/fluid/lite/
api/paddle_
use_passes.h"
#include "paddle/fluid/lite/core/optimizer.h"
#include "paddle/fluid/lite/core/program_fake_utils.h"
#include "paddle/fluid/lite/kernels/cuda/use_kernels.h"
...
...
paddle/fluid/lite/core/op_registry.h
浏览文件 @
329e768b
...
...
@@ -20,6 +20,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
#include "paddle/fluid/lite/api/paddle_lite_factory_helper.h"
#include "paddle/fluid/lite/core/kernel.h"
#include "paddle/fluid/lite/core/op_lite.h"
#include "paddle/fluid/lite/core/target_wrapper.h"
...
...
@@ -32,7 +33,6 @@ namespace lite {
using
KernelFunc
=
std
::
function
<
void
()
>
;
using
KernelFuncCreator
=
std
::
function
<
std
::
unique_ptr
<
KernelFunc
>
()
>
;
class
LiteOpRegistry
final
:
public
Factory
<
OpLite
,
std
::
shared_ptr
<
OpLite
>>
{
public:
static
LiteOpRegistry
&
Global
()
{
...
...
@@ -177,7 +177,6 @@ class KernelRegistor : public lite::Registor<KernelType> {
// Operator registry
#define LITE_OP_REGISTER_INSTANCE(op_type__) op_type__##__registry__instance__
#define LITE_OP_REGISTER_FAKE(op_type__) op_type__##__registry__
#define REGISTER_LITE_OP(op_type__, OpClass) \
static paddle::lite::OpLiteRegistor<OpClass> LITE_OP_REGISTER_INSTANCE( \
op_type__)(#op_type__); \
...
...
@@ -185,11 +184,6 @@ class KernelRegistor : public lite::Registor<KernelType> {
return LITE_OP_REGISTER_INSTANCE(op_type__).Touch(); \
}
#define USE_LITE_OP(op_type__) \
extern int touch_op_##op_type__(); \
int LITE_OP_REGISTER_FAKE(op_type__) __attribute__((unused)) = \
touch_op_##op_type__();
// Kernel registry
#define LITE_KERNEL_REGISTER(op_type__, target__, precision__) \
op_type__##__##target__##__##precision__##__registor__
...
...
@@ -219,12 +213,6 @@ class KernelRegistor : public lite::Registor<KernelType> {
TARGET(target__), PRECISION(precision__), DATALAYOUT(layout__)>( \
#op_type__ "/" #alias__)
#define USE_LITE_KERNEL(op_type__, target__, precision__, layout__, alias__) \
extern int touch_##op_type__##target__##precision__##layout__##alias__(); \
int op_type__##target__##precision__##layout__##alias__ \
__attribute__((unused)) = \
touch_##op_type__##target__##precision__##layout__##alias__();
#define LITE_KERNEL_INSTANCE(op_type__, target__, precision__, layout__, \
alias__) \
op_type__##target__##precision__##layout__##alias__
...
...
paddle/fluid/lite/core/optimizer_test.cc
浏览文件 @
329e768b
...
...
@@ -16,10 +16,10 @@
#include <gtest/gtest.h>
#include <memory>
#include <utility>
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/mir/generate_program_pass.h"
#include "paddle/fluid/lite/core/mir/pass_manager.h"
#include "paddle/fluid/lite/core/mir/static_kernel_pick_pass.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/core/program_fake_utils.h"
namespace
paddle
{
...
...
paddle/fluid/lite/core/target_wrapper.h
浏览文件 @
329e768b
...
...
@@ -16,7 +16,7 @@
#include <iostream>
#include <sstream>
#include <string>
#include "paddle/fluid/lite/api/place.h"
#include "paddle/fluid/lite/api/p
addle_p
lace.h"
#include "paddle/fluid/lite/utils/cp_logging.h"
#ifdef LITE_WITH_CUDA
...
...
paddle/fluid/lite/tools/build.sh
浏览文件 @
329e768b
...
...
@@ -85,6 +85,9 @@ function build_single {
function
build
{
make lite_compile_deps
-j
$NUM_CORES_FOR_COMPILE
# test publish inference lib
make publish_inference_lite
}
# It will eagerly test all lite related unittests.
...
...
@@ -104,6 +107,7 @@ function build_test_server {
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:/paddle/build/third_party/install/mklml/lib"
cmake_x86_for_CI
build
test_lite
$TESTS_FILE
}
...
...
@@ -223,6 +227,9 @@ function build_arm {
cmake_arm
${
os
}
${
abi
}
${
lang
}
build
$TESTS_FILE
# test publish inference lib
make publish_inference_lite
}
# $1: ARM_TARGET_OS in "android" , "armlinux"
...
...
paddle/fluid/lite/tools/debug/model_debug_tool.cc
浏览文件 @
329e768b
...
...
@@ -16,10 +16,10 @@
#include <string>
#include <vector>
#include "paddle/fluid/lite/api/cxx_api.h"
#include "paddle/fluid/lite/core/mir/use_passes.h"
#include "paddle/fluid/lite/api/paddle_use_kernels.h"
#include "paddle/fluid/lite/api/paddle_use_ops.h"
#include "paddle/fluid/lite/api/paddle_use_passes.h"
#include "paddle/fluid/lite/core/op_registry.h"
#include "paddle/fluid/lite/kernels/use_kernels.h"
#include "paddle/fluid/lite/operators/use_ops.h"
#include "paddle/fluid/lite/tools/debug/debug_utils.h"
namespace
paddle
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录