提交 dcfab111 编写于 作者: P peizhilin

merge from develop

上级 4ffa92d4
...@@ -648,6 +648,12 @@ int MultiDevSSAGraphBuilder::GetVarDeviceID( ...@@ -648,6 +648,12 @@ int MultiDevSSAGraphBuilder::GetVarDeviceID(
const ir::Graph &graph, const std::string &varname, const ir::Graph &graph, const std::string &varname,
const std::unordered_map<std::string, int> &sharded_var_device) const { const std::unordered_map<std::string, int> &sharded_var_device) const {
auto got = sharded_var_device.find(varname); auto got = sharded_var_device.find(varname);
if (got == sharded_var_device.end()) {
auto pos = varname.find(framework::kNewGradSuffix);
if (pos != std::string::npos) {
got = sharded_var_device.find(varname.substr(0, pos));
}
}
return got == sharded_var_device.end() ? -1 : got->second; return got == sharded_var_device.end() ? -1 : got->second;
} }
......
...@@ -57,6 +57,9 @@ math_library(sequence_padding) ...@@ -57,6 +57,9 @@ math_library(sequence_padding)
math_library(sequence_pooling DEPS math_function) math_library(sequence_pooling DEPS math_function)
math_library(sequence_scale) math_library(sequence_scale)
math_library(softmax DEPS math_function) math_library(softmax DEPS math_function)
if (NOT WIN32)
math_library(matrix_bit_code)
endif (NOT WIN32)
math_library(unpooling) math_library(unpooling)
math_library(vol2col) math_library(vol2col)
...@@ -80,4 +83,6 @@ if (NOT WIN32) ...@@ -80,4 +83,6 @@ if (NOT WIN32)
list(APPEND JIT_KERNEL_SRCS jit_gen.cc jit_code.cc) list(APPEND JIT_KERNEL_SRCS jit_gen.cc jit_code.cc)
list(APPEND JIT_KERNEL_DEPS xbyak) list(APPEND JIT_KERNEL_DEPS xbyak)
endif() endif()
cc_library(jit_kernel SRCS ${JIT_KERNEL_SRCS} DEPS ${JIT_KERNEL_DEPS})
cc_test(jit_kernel_test SRCS jit_kernel_test.cc DEPS jit_kernel)
endif (NOT WIN32) endif (NOT WIN32)
...@@ -64,6 +64,8 @@ struct SelectedRowsSumTo { ...@@ -64,6 +64,8 @@ struct SelectedRowsSumTo {
framework::SelectedRows* input2); framework::SelectedRows* input2);
}; };
// FIXME: The result of SelectedRowsAddToTensor maybe non deterministic,
// because it uses CudaAtomicAdd.
// input2 = input1 + input2 // input2 = input1 + input2
template <typename DeviceContext, typename T> template <typename DeviceContext, typename T>
struct SelectedRowsAddToTensor { struct SelectedRowsAddToTensor {
......
...@@ -367,7 +367,12 @@ function run_test() { ...@@ -367,7 +367,12 @@ function run_test() {
Running unit tests ... Running unit tests ...
======================================== ========================================
EOF EOF
ctest --output-on-failure if [ ${TESTING_DEBUG_MODE:-OFF} == "ON" ] ; then
ctest -V
else
ctest --output-on-failure
fi
# make install should also be test when unittest # make install should also be test when unittest
make install -j `nproc` make install -j `nproc`
pip install ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl pip install ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册