Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/6209#discussion_r30467658
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/linalg/BLASSuite.scala ---
@@ -270,17 +271,26 @@ class BLASSuite extends FunSuite {
val expected2 = new DenseVector(Array(6.0, 7.0, 4.0, 9.0))
val expected3 = new DenseVector(Array(10.0, 8.0, 6.0, 18.0))
- gemv(1.0, dA, x, 2.0, y1)
- gemv(1.0, sA, x, 2.0, y2)
- gemv(2.0, dA, x, 2.0, y3)
- gemv(2.0, sA, x, 2.0, y4)
+ gemv(1.0, dA, dx, 2.0, y1)
+ gemv(1.0, sA, dx, 2.0, y2)
+ gemv(2.0, dA, dx, 2.0, y3)
+ gemv(2.0, sA, dx, 2.0, y4)
assert(y1 ~== expected2 absTol 1e-15)
assert(y2 ~== expected2 absTol 1e-15)
assert(y3 ~== expected3 absTol 1e-15)
assert(y4 ~== expected3 absTol 1e-15)
+
+ val y1_copy = new DenseVector(Array(1.0, 3.0, 1.0, 0.0))
+ val y3_copy = y1_copy.copy
+
+ gemv(1.0, dA, sx, 2.0, y1_copy)
+ gemv(2.0, dA, sx, 2.0, y3_copy)
+ assert(y1_copy ~== expected2 absTol 1e-15)
+ assert(y3_copy ~== expected3 absTol 1e-15)
+
withClue("columns of A don't match the rows of B") {
intercept[Exception] {
- gemv(1.0, dA.transpose, x, 2.0, y1)
+ gemv(1.0, dA.transpose, dx, 2.0, y1)
}
}
--- End diff --
check exception for
```
gemv(1.0, dA.transpose, dx, 2.0, y1)
gemv(1.0, sA.transpose, dx, 2.0, y1)
gemv(1.0, dA.transpose, sx, 2.0, y1)
gemv(1.0, sA.transpose, sx, 2.0, y1)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]