[UT coverage] improve the mul_mkldnn_op line coverage (#22408)

* improve the mul_mkldnn_op line coverage
test=develop

* remove fp32 mul mkldnn kernel
test=develop

* locally refactoring
test=develop

* change according to reviews
test=develop
revert-22710-feature/integrated_ps_api
lidanqing 5 years ago committed by GitHub
parent c65c6ae534
commit d926214535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

@ -52,11 +52,11 @@ class TestMKLDNNMulOpS8S8(OpTest):
# limit random range inside |-127, 127| to avoid overflow on SKL
if self.srctype == np.int8:
A_data = np.random.randint(-127, 127, (2, 5)).astype(np.int8)
A_data = np.random.randint(-127, 127, (20, 5)).astype(np.int8)
else:
A_data = np.random.randint(0, 127, (2, 5)).astype(np.uint8)
A_data = np.random.randint(0, 127, (20, 5)).astype(np.uint8)
B_data = np.random.uniform(-127, 127, (5, 3)).astype(np.float32)
B_data = np.random.uniform(-127, 127, (5, 20)).astype(np.float32)
quant_B = np.round(B_data * self.scale_y[0]).astype(np.int)
output = np.dot(A_data, quant_B)

Loading…
Cancel
Save