提交 7f408f97 编写于 作者: J Jacek Czaja

- Faulty UT workaround

上级 b54fcfae
...@@ -54,8 +54,12 @@ class EltwiseMKLDNNKernel : public framework::OpKernel<T> { ...@@ -54,8 +54,12 @@ class EltwiseMKLDNNKernel : public framework::OpKernel<T> {
const auto src_x_memory = handler.AcquireSrcMemory(x); const auto src_x_memory = handler.AcquireSrcMemory(x);
const auto src_y_memory = handler.AcquireSecondSrcMemory(y); const auto src_y_memory = handler.AcquireSecondSrcMemory(y);
// For Inplace src and and dst are the same memory object // For Inplace src and and dst are the same memory object
auto dst_memory = // (jczaja) UT mechanics is testing inplace for this op
x->IsSharedBufferWith(*z) ? src_x_memory : handler.AcquireDstMemory(z); // regardless shapes, which is wrong when X is to be broadcasted as output
// is of bigger shape that X.
auto dst_memory = (x->numel() == z->numel() && x->IsSharedBufferWith(*z))
? src_x_memory
: handler.AcquireDstMemory(z);
const auto binary_prim = handler.AcquireForwardPrimitive(); const auto binary_prim = handler.AcquireForwardPrimitive();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册