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

Commit

Permalink
Add CPU C++ test stage and fix CPU ACTIVATION_PERF.ExecuteBidirectional
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Nov 20, 2018
1 parent 779bdc5 commit 65bcfe8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
16 changes: 14 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ core_logic: {
ws('workspace/ut-cpp-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('cmake_gpu', mx_cmake_lib, true)
utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_cpp', true)
utils.docker_run('ubuntu_gpu', 'unittest_cpp', true)
utils.publish_test_coverage()
}
}
Expand All @@ -758,12 +758,24 @@ core_logic: {
ws('workspace/ut-cpp-mkldnn-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('cmake_mkldnn_gpu', mx_cmake_mkldnn_lib, true)
utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_cpp', true)
utils.docker_run('ubuntu_gpu', 'unittest_cpp', true)
utils.publish_test_coverage()
}
}
}
},
'Cpp: CPU': {
node(NODE_LINUX_GPU) {
ws('workspace/ut-cpp-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('ubuntu_cpu', mx_cmake_lib_debug, true)
utils.docker_run('ubuntu_gpu', 'unittest_cpp', true)
utils.publish_test_coverage()
}
}
}
},

'R: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/ut-r-cpu') {
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ unittest_ubuntu_cpugpu_perl() {
./perl-package/test.sh
}

unittest_ubuntu_gpu_cpp() {
unittest_cpp() {
set -ex
build/tests/mxnet_unit_tests
}
Expand Down
7 changes: 1 addition & 6 deletions src/operator/nn/activation-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,8 @@ void ActivationGradCompute(const nnvm::NodeAttrs& attrs,
const std::vector<OpReqType>& req,
const std::vector<TBlob>& outputs) {
const ActivationParam& param = nnvm::get<ActivationParam>(attrs.parsed);
#if (MXNET_USE_CUDNN == 1 || MXNET_USE_MKLDNN == 1)
bool relu = param.act_type == activation::kReLU;
const bool relu = param.act_type == activation::kReLU;
CHECK_EQ(inputs.size(), relu ? 2U : 3U);
#else
bool softsign = param.act_type == activation::kSoftSign;
CHECK_EQ(inputs.size(), softsign ? 3U : 2U);
#endif
CHECK_EQ(outputs.size(), 1U);
CHECK_EQ(req.size(), 1U);
ActivationGradComputeImpl<xpu>(attrs, ctx, inputs, req, outputs);
Expand Down

0 comments on commit 65bcfe8

Please sign in to comment.