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

【paddle_test No.16】replace parts of cc_test with paddle_test #61672

Merged
merged 28 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3d14d71
Update test_quantization_scale_pass.py
Liyulingyue Feb 2, 2024
be297b2
Update test_rnn_decode_api.py
Liyulingyue Feb 2, 2024
27acf93
Update test_save_inference_model.py
Liyulingyue Feb 2, 2024
c94fbc1
Update test_seq2seq.py
Liyulingyue Feb 2, 2024
2fa5117
Update test_static_save_load.py
Liyulingyue Feb 2, 2024
9d045e7
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 3, 2024
35a5604
Update CMakeLists.txt
Liyulingyue Feb 6, 2024
172baec
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 6, 2024
e3a5f7d
mv PD_DECLARE and USE_OP_ITSELF in test_mkldnn_op_inplace.cc
Liyulingyue Feb 7, 2024
6f2047a
Update CMakeLists.txt
Liyulingyue Feb 7, 2024
1623c0c
add test_API and rm USE_PASS
Liyulingyue Feb 7, 2024
b5153fc
add test_API
Liyulingyue Feb 7, 2024
63cd174
rollback
Liyulingyue Feb 7, 2024
2703556
Update graph.h
Liyulingyue Feb 7, 2024
74c0e5a
Apply suggestions from code review
Liyulingyue Feb 7, 2024
5e82724
Update CMakeLists.txt
Liyulingyue Feb 8, 2024
0a2728e
delete use_it_self of conv2 in test_conv_mkldnn_nhwc.cc
Liyulingyue Feb 8, 2024
4c951f5
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 8, 2024
279aedb
Update CMakeLists.txt
Liyulingyue Feb 8, 2024
e142920
add TEST_API and rm use_it_self
Liyulingyue Feb 8, 2024
8ba6972
Update CMakeLists.txt
Liyulingyue Feb 9, 2024
7980677
Update test_mkldnn_pool_adaptive_op.cc
Liyulingyue Feb 9, 2024
2fa1fb5
Update CMakeLists.txt
Liyulingyue Feb 9, 2024
633d762
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 9, 2024
bf9b98d
add TEST_API and rm use-op-self
Liyulingyue Feb 9, 2024
78fae41
Update CMakeLists.txt
Liyulingyue Feb 9, 2024
93722ab
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 9, 2024
8d1fd6e
Merge branch 'PaddlePaddle:develop' into C16
Liyulingyue Feb 18, 2024
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
6 changes: 3 additions & 3 deletions paddle/fluid/framework/ir/pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ constexpr char kStartupProgramDescs[] = "startup_program_descs";
} // namespace details

namespace ir {
class Graph;
class TEST_API Graph;
Liyulingyue marked this conversation as resolved.
Show resolved Hide resolved

template <typename PassType>
struct PassRegistrar;
Expand Down Expand Up @@ -81,7 +81,7 @@ class Pass {

std::string Type() const { return type_; }

Graph *Apply(Graph *graph) const;
TEST_API Graph *Apply(Graph *graph) const;

// Get a reference to the attributed previously set.
template <typename AttrType>
Expand Down Expand Up @@ -238,7 +238,7 @@ class Registrar {

class PassRegistry {
public:
static PassRegistry &Instance();
TEST_API static PassRegistry &Instance();

bool Has(const std::string &pass_type) const {
return map_.find(pass_type) != map_.end();
Expand Down
28 changes: 2 additions & 26 deletions test/cpp/fluid/mkldnn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
get_property(paddle_lib GLOBAL PROPERTY PADDLE_LIB_NAME)
cc_test(
test_mkldnn_op_inplace
SRCS test_mkldnn_op_inplace.cc
DEPS executor
op_registry
elementwise_add_op
activation_op
phi
common
scope
device_context
enforce
generated_static_op)
cc_test(
test_mkldnn_cpu_quantize_pass
SRCS test_mkldnn_cpu_quantize_pass.cc
DEPS executor
op_registry
activation_op
conv_activation_mkldnn_fuse_pass
cpu_quantize_placement_pass
cpu_quantize_pass
phi
common
scope
device_context)
paddle_test(test_mkldnn_op_inplace SRCS test_mkldnn_op_inplace.cc)
paddle_test(test_mkldnn_cpu_quantize_pass SRCS test_mkldnn_cpu_quantize_pass.cc)

cc_test(
test_conv_mkldnn_nhwc
Expand Down
4 changes: 0 additions & 4 deletions test/cpp/fluid/mkldnn/test_mkldnn_cpu_quantize_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,3 @@ TEST(cpuQuantizePass, ConvReLU6) {

} // namespace pass
} // namespace paddle

USE_PASS(conv_activation_mkldnn_fuse_pass);
USE_PASS(cpu_quantize_placement_pass);
USE_PASS(cpu_quantize_pass);
6 changes: 0 additions & 6 deletions test/cpp/fluid/mkldnn/test_mkldnn_op_inplace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@
#include "paddle/phi/core/enforce.h"
#include "paddle/phi/core/kernel_registry.h"

USE_OP_ITSELF(elementwise_add);
PD_DECLARE_KERNEL(add_raw, OneDNN, ONEDNN);
USE_OP_ITSELF(relu);
PD_DECLARE_KERNEL(relu, OneDNN, ONEDNN);
USE_OP_ITSELF(softmax);
PD_DECLARE_KERNEL(softmax, OneDNN, ONEDNN);
PD_DECLARE_KERNEL(softmax, CPU, ALL_LAYOUT);

namespace paddle {
namespace operators {
Expand Down