|
|
@ -21,6 +21,9 @@ from paddle.fluid.op import Operator
|
|
|
|
from paddle.fluid.tests.unittests.test_elementwise_mul_op import *
|
|
|
|
from paddle.fluid.tests.unittests.test_elementwise_mul_op import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO(LeoZhao-Intel): re-enable this case
|
|
|
|
|
|
|
|
# https://github.com/PaddlePaddle/Paddle/issues/16764
|
|
|
|
|
|
|
|
@unittest.skip("Not supported well on avx2.")
|
|
|
|
class TestElementwiseMulMKLDNNOp_BroadcastNCHW16c(ElementwiseMulOp):
|
|
|
|
class TestElementwiseMulMKLDNNOp_BroadcastNCHW16c(ElementwiseMulOp):
|
|
|
|
def init_input_output(self):
|
|
|
|
def init_input_output(self):
|
|
|
|
x = np.random.rand(1, 16, 2, 2).astype(self.dtype)
|
|
|
|
x = np.random.rand(1, 16, 2, 2).astype(self.dtype)
|
|
|
@ -29,7 +32,7 @@ class TestElementwiseMulMKLDNNOp_BroadcastNCHW16c(ElementwiseMulOp):
|
|
|
|
|
|
|
|
|
|
|
|
self.out = x * self.y.reshape(1, 16, 1, 1)
|
|
|
|
self.out = x * self.y.reshape(1, 16, 1, 1)
|
|
|
|
|
|
|
|
|
|
|
|
# self.out = self.out.transpose(0, 2, 3, 1).reshape(1, 16, 2, 2)
|
|
|
|
self.out = self.out.transpose(0, 2, 3, 1).reshape(1, 16, 2, 2)
|
|
|
|
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
def setUp(self):
|
|
|
|
super(TestElementwiseMulMKLDNNOp_BroadcastNCHW16c, self).setUp()
|
|
|
|
super(TestElementwiseMulMKLDNNOp_BroadcastNCHW16c, self).setUp()
|
|
|
|