Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Use CoreOpRunner for refactored Ops.
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da committed Nov 30, 2017
1 parent b161709 commit a28586f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/cpp/operator/activation_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TEST(ACTIVATION_PERF, ExecuteBidirectional) {
TShape shape({5, 5});
kwargs_t kwargs = basic_activation_args;
kwargs.push_back({"act_type", "tanh"});
test::op::LegacyOpRunner<mxnet::op::ActivationProp, float, float> runner;
test::op::CoreOpRunner<mxnet::op::ActivationProp, float, float> runner;
runner.RunBidirectional(false, { shape }, kwargs, 1);
}

Expand All @@ -52,7 +52,7 @@ TEST(ACTIVATION_PERF, TimingCPU) {
kwargs_t kwargs = basic_activation_args;
// Which math function is arbitrary since it will have roughly constant timing among approaches
kwargs.push_back({"act_type", "tanh"});
test::op::LegacyOpRunner<mxnet::op::ActivationProp, float, float> runner;
test::op::CoreOpRunner<mxnet::op::ActivationProp, float, float> runner;
runner.RunBidirectional(false,
{ TShape({10, 10, 10, 10}) },
kwargs, 1); // prime code and cache
Expand Down
4 changes: 2 additions & 2 deletions tests/cpp/operator/fully_conn_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const kwargs_t basic_fullyconn_args = { {"num_hidden", "250"} };
TEST(FULLY_CONNECTED, ExecuteBidirectionalFullyConnected) {
TShape shape({5, 5});
kwargs_t kwargs = basic_fullyconn_args;
test::op::LegacyOpRunner<mxnet::op::FullyConnectedProp, float, float> runner;
test::op::CoreOpRunner<mxnet::op::FullyConnectedProp, float, float> runner;
runner.RunBidirectional(false, { shape }, kwargs, 1);
}

Expand All @@ -50,7 +50,7 @@ TEST(FULLY_CONNECTED, ExecuteBidirectionalFullyConnected) {
*/
TEST(FULLY_CONNECTED, FullyConnectedTimingCPU) {
kwargs_t kwargs = basic_fullyconn_args;
test::op::LegacyOpRunner<mxnet::op::FullyConnectedProp, float, float> runner;
test::op::CoreOpRunner<mxnet::op::FullyConnectedProp, float, float> runner;
runner.RunBidirectional(false,
{ TShape({10, 10, 10, 10}) },
kwargs, 1); // prime code and cache
Expand Down

0 comments on commit a28586f

Please sign in to comment.