!18629 stop mutmul to mul on GPU
Merge pull request !18629 from lingyunli63/stop_matmul_to_mul_GPU
This commit is contained in:
commit
04f42b9901
|
@ -34,7 +34,7 @@ class MatMul(Expander):
|
|||
|
||||
def _optimize_to_mul(self):
|
||||
"""check if matmul can be replace by mul"""
|
||||
if self.left_format != DF.DEFAULT or self.right_format != DF.DEFAULT:
|
||||
if self.processor != 'aicore' or self.left_format != DF.DEFAULT or self.right_format != DF.DEFAULT:
|
||||
return False
|
||||
k_a = self.shape_a[-2] if self.transpose_a else self.shape_a[-1]
|
||||
k_b = self.shape_b[-1] if self.transpose_b else self.shape_b[-2]
|
||||
|
|
Loading…
Reference in New Issue