Skip to content

Commit 02fdf24

Browse files
committed
enable copyFrom of MKLDNNMatrix
1 parent ac6f066 commit 02fdf24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paddle/math/MKLDNNMatrix.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ class MKLDNNMatrix : public CpuMatrix, public mkldnn::memory {
9191
const MKLDNNMatrixPtr& dst,
9292
bool checkData = true);
9393

94+
void copyFrom(const Matrix& src) {
95+
// TODO(TJ): reorder data if this format is not nchw or x
96+
m_->copyFrom(src);
97+
}
98+
9499
public:
95100
/**
96101
* Reorder this MKLDNNMatrix from other format.

0 commit comments

Comments
 (0)