diff --git a/src/concrete/ml/onnx/ops_impl.py b/src/concrete/ml/onnx/ops_impl.py index 1d27a7c4d..1b13f8ef7 100644 --- a/src/concrete/ml/onnx/ops_impl.py +++ b/src/concrete/ml/onnx/ops_impl.py @@ -288,23 +288,7 @@ def numpy_gemm( b_prime = numpy.transpose(b) if transB else b c_prime: Union[numpy.ndarray, float] = c if c is not None else 0 - # Do - # - # y = processed_alpha * numpy.matmul(a_prime, b_prime) + processed_beta * c_prime - # - # in an efficient way, i.e., to make tracing directly optimized, without expecting any opt from - # the compiler here - - y = numpy.matmul(a_prime, b_prime) - - if processed_alpha != 1: - y = y * processed_alpha - - if numpy.any(c_prime != 0): - if processed_beta == 1: - y = y + c_prime - else: - y = y + processed_beta * c_prime + y = processed_alpha * numpy.matmul(a_prime, b_prime) + processed_beta * c_prime return (y,)