Discussion:
[jira] [Created] (MAHOUT-1903) Fix VCL vector %*% vector implementation
Andrew Palumbo (JIRA)
2017-01-10 23:06:58 UTC
Permalink
Andrew Palumbo created MAHOUT-1903:
--------------------------------------

Summary: Fix VCL vector %*% vector implementation
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0


Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2017-01-11 02:53:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo updated MAHOUT-1903:
-----------------------------------
Sprint: Jan/Feb-2017
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2017-02-26 08:12:44 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MAHOUT-1903 started by Andrew Palumbo.
----------------------------------------------
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-26 09:43:46 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884686#comment-15884686 ]

ASF GitHub Bot commented on MAHOUT-1903:
----------------------------------------

GitHub user andrewpalumbo opened a pull request:

https://github.com/apache/mahout/pull/286

[MAHOUT-1903][MAHOUT-1907] VCL Vector fix.

After several weeks of discussion with Karl, it turns out that this was a simple fix. Vectors *must* be copied back to MAIN_MEMORY, before trying to read elements out. This seems not to be an issue with Matrices.

Fixed the memory copy issue, however seeing a small numerical error:
```
- VCL Dense Matrix %*% Dense vector *** FAILED ***
2.1868857395626282E-16 was not less than 1.0E-16 (ViennaCLSuiteVCL.scala:346)
+ Mahout dense matrix %*% dense vector multiplication time: 0 ms.
+ ViennaCL/OpenCL dense matrix %*% dense vector multiplication time: 5 ms.
```
Relaxing the assertion by an order of magnitude (-1E16 to -1E15) will solve this problem, however these small numerical differences between the JVM and the Device are interesting and possibly significant for highly iterative algorithms.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/andrewpalumbo/mahout MAHOUT-1903

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/mahout/pull/286.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #286

----
commit 8bda62cace3d1d63a0bda20c94e4e09ea94e3dc4
Author: Andrew Palumbo <***@apache.org>
Date: 2017-02-26T09:25:30Z

fixed the memory copy issue. Tests are failing numerically now

----
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-26 10:19:45 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884697#comment-15884697 ]

ASF GitHub Bot commented on MAHOUT-1903:
----------------------------------------

Github user andrewpalumbo commented on the issue:

https://github.com/apache/mahout/pull/286

There seems to be some loss of precision when performing matrix %*% vector multiplication on GPU. for each few orders of magnitude I raised the num elements, i had to relax epsilon by an order.

We know that dense algebra is not where OpenCL shines but I am wondering if it is possible that vectors are being converted to fp32 from fp64.

The same test, with same values, when run in main memory on OpenMP gives the same precision as the Mahout Jvm with an epsilon of -1e16.

Not a blocker IMO. As Well GPU vectors give us access to an entire library of Native Iterative solvers.
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-26 21:37:45 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884922#comment-15884922 ]

ASF GitHub Bot commented on MAHOUT-1903:
----------------------------------------

Github user asfgit closed the pull request at:

https://github.com/apache/mahout/pull/286
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Andrew Palumbo (JIRA)
2017-02-26 21:42:46 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo resolved MAHOUT-1903.
------------------------------------
Resolution: Fixed
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Hudson (JIRA)
2017-02-26 22:17:45 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884931#comment-15884931 ]

Hudson commented on MAHOUT-1903:
--------------------------------

FAILURE: Integrated in Jenkins build Mahout-Quality #3425 (See [https://builds.apache.org/job/Mahout-Quality/3425/])
[MAHOUT-1903][MAHOUT-1907] VCL Vector memory copy fix. closes (apalumbo: rev 0f4b3d97cfc651a4bc052515b260648cd0093ac2)
* (edit) viennacl/src/main/scala/org/apache/mahout/viennacl/opencl/javacpp/VCLVector.scala
* (edit) viennacl/src/test/scala/org/apache/mahout/viennacl/opencl/ViennaCLSuiteVCL.scala
* (edit) viennacl/src/main/scala/org/apache/mahout/viennacl/opencl/javacpp/VectorBase.scala
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Hudson (JIRA)
2017-02-26 23:27:46 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884969#comment-15884969 ]

Hudson commented on MAHOUT-1903:
--------------------------------

FAILURE: Integrated in Jenkins build Mahout-Quality #3426 (See [https://builds.apache.org/job/Mahout-Quality/3426/])
MAHOUT-1903: Fix VCL vector %*% vector implementation (akm: rev b8f9d26db736268ec1b268cebaec1bed2e860523)
* (edit) viennacl/src/test/scala/org/apache/mahout/viennacl/opencl/ViennaCLSuiteVCL.scala
Post by Andrew Palumbo (JIRA)
Fix VCL vector %*% vector implementation
----------------------------------------
Key: MAHOUT-1903
URL: https://issues.apache.org/jira/browse/MAHOUT-1903
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Andrew Palumbo
Assignee: Andrew Palumbo
Fix For: 0.13.0
Vector %*% vector and vector %*% Matrix need to have memory allocation Re-written. Currently they are commented out in tests
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Loading...