spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiangrui Meng (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-9175) BLAS.gemm fails to update matrix C when alpha==0 and beta!=1
Date Tue, 21 Jul 2015 00:01:11 GMT

     [ https://issues.apache.org/jira/browse/SPARK-9175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiangrui Meng updated SPARK-9175:
---------------------------------
    Shepherd: Xiangrui Meng

> BLAS.gemm fails to update matrix C when alpha==0 and beta!=1
> ------------------------------------------------------------
>
>                 Key: SPARK-9175
>                 URL: https://issues.apache.org/jira/browse/SPARK-9175
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>    Affects Versions: 1.4.0
>            Reporter: Meihua Wu
>            Priority: Critical
>
> In the BLAS wrapper, gemm is supposed to update matrix C to be alpha * A * B + beta *
C. However, the current implementation will not update C as long as alpha == 0. This is incorrect
when beta is not equal to 1. 
> Example:
> val p = 3 
> val a = DenseMatrix.zeros(p,p)
> val b = DenseMatrix.zeros(p,p)
> var c = DenseMatrix.eye(p)
> BLAS.gemm(0, a, b, 5, c)
> c is unchanged in the Spark 1.4 even though it should be multiplied by 5 element-wise.
> The bug is caused by the following in BLAS.gemm:
> if (alpha == 0.0) {
>   logDebug("gemm: alpha is equal to 0. Returning C.")
> }
> Will submit PR to fix this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message