|
|
|
@ -294,12 +294,9 @@ void MKLDNNConvLayer::resetOutValue(
|
|
|
|
|
std::shared_ptr<conv_fwd::primitive_desc>& pd, MKLDNNMatrixPtr& out) {
|
|
|
|
|
out = MKLDNNMatrix::create(output_.value, pd->dst_primitive_desc());
|
|
|
|
|
|
|
|
|
|
// change original output value from cpu matrix to mkldnn matrix
|
|
|
|
|
output_.value = std::dynamic_pointer_cast<Matrix>(out);
|
|
|
|
|
|
|
|
|
|
// create reorder if output value has cpu device and pd do not match
|
|
|
|
|
cpuOutVal_ = nullptr;
|
|
|
|
|
cpuOutVal_ = nullptr;
|
|
|
|
|
cvtOutVal_ = nullptr;
|
|
|
|
|
if (!outputIsOnlyMKLDNN()) {
|
|
|
|
|
const MatrixPtr& cpuOut = getOutput(CPU_DEVICE).value;
|
|
|
|
|
memory::dims outDims = memory::dims{bs_, oc_, oh_, ow_};
|
|
|
|
|