Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Implement native CUDA bindings using JCuda

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user nsakharnykh opened a pull request:

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

          MAHOUT-1974 CUDA support

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

          $ git pull https://github.com/nsakharnykh/mahout mahout-1974

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

          https://github.com/apache/mahout/pull/310.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 #310


          commit 9706bb88f3e21ddb910864c85f9d859f9d73708d
          Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com>
          Date: 2017-03-27T19:59:49Z

          Initial version of CUDA bindings using JCuda

          commit ab5e6353cc4abc5ef086bd4326d26e9c909c572f
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-03-30T04:17:59Z

          [WIP]Quick unit test benchmarks.. have not installed cusparse library yet

          commit eaedfceb5378655b5a1a3edfa22b82aaebf7a71c
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T03:10:32Z

          Fix parameter name in comments

          commit 0d0b4e69bdcc28cd203a35ad608e0dbafe93f7ca
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T09:22:52Z

          Added test to read env variables:

          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_N=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_M=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_S=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export DENSITY=.2
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export NUM_RUNS=2
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SEED=1234

          commit b06678d0dc08b176863e311da59a869c4899974b
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T09:27:47Z

          add default run size (and a timer)

          commit 2cfbf75968fccded1350b7d297bc4195d0034399
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T15:09:34Z

          Fix error in hard coded unit test

          commit 35c540e4eebadfa11f761bc0c61e97db48e840ea
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T15:48:25Z

          Change geometry of test vars for a faster run.

          commit 9cc58a6c8495dd090abbc3609ffcfe5149c59c43
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T17:30:52Z

          add in some verbosity for cuda mmul test

          commit dd561bc577d35b3e30f871b705887af3105f843c
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:09:51Z

          Cosmetic changes to unit tests

          commit cdb6ca002c78f466db09bf9321e070c3546294c9
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:11:11Z

          Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/mahout into AP-UNIT-TEST

          commit e72053df98fc8281952d6fd108696daa5d62afe6
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:22:43Z

          cosmetic change for user defined variable run

          commit 72bbf131f33dfd84cfbd5478004405dfffc5a966
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-20T04:03:17Z

          Supply default environment settings for tests.

          commit 68e8400fae4d3487f93da8b085e68f4d55bf1e07
          Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com>
          Date: 2017-04-25T19:20:46Z

          Enable exceptions for JCuda libraries


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user nsakharnykh opened a pull request: https://github.com/apache/mahout/pull/310 MAHOUT-1974 CUDA support You can merge this pull request into a Git repository by running: $ git pull https://github.com/nsakharnykh/mahout mahout-1974 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/mahout/pull/310.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 #310 commit 9706bb88f3e21ddb910864c85f9d859f9d73708d Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com> Date: 2017-03-27T19:59:49Z Initial version of CUDA bindings using JCuda commit ab5e6353cc4abc5ef086bd4326d26e9c909c572f Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-03-30T04:17:59Z [WIP] Quick unit test benchmarks.. have not installed cusparse library yet commit eaedfceb5378655b5a1a3edfa22b82aaebf7a71c Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T03:10:32Z Fix parameter name in comments commit 0d0b4e69bdcc28cd203a35ad608e0dbafe93f7ca Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T09:22:52Z Added test to read env variables: andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_N=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_M=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_S=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export DENSITY=.2 andy@micheal:~/sandbox/mahout_cuda/cuda$ export NUM_RUNS=2 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SEED=1234 commit b06678d0dc08b176863e311da59a869c4899974b Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T09:27:47Z add default run size (and a timer) commit 2cfbf75968fccded1350b7d297bc4195d0034399 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T15:09:34Z Fix error in hard coded unit test commit 35c540e4eebadfa11f761bc0c61e97db48e840ea Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T15:48:25Z Change geometry of test vars for a faster run. commit 9cc58a6c8495dd090abbc3609ffcfe5149c59c43 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T17:30:52Z add in some verbosity for cuda mmul test commit dd561bc577d35b3e30f871b705887af3105f843c Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:09:51Z Cosmetic changes to unit tests commit cdb6ca002c78f466db09bf9321e070c3546294c9 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:11:11Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/mahout into AP-UNIT-TEST commit e72053df98fc8281952d6fd108696daa5d62afe6 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:22:43Z cosmetic change for user defined variable run commit 72bbf131f33dfd84cfbd5478004405dfffc5a966 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-20T04:03:17Z Supply default environment settings for tests. commit 68e8400fae4d3487f93da8b085e68f4d55bf1e07 Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com> Date: 2017-04-25T19:20:46Z Enable exceptions for JCuda libraries
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          Tests pass on my system:
          ```
          Mahout JVM Sparse multiplication time: 1914 ms.
          Mahout JCuda Sparse multiplication time: 195 ms.

          • sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .2. 5 runs
            Mahout JVM Sparse multiplication time: 43 ms.
            Mahout JCuda Sparse multiplication time: 11 ms.
          • sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .02. 5 runs
            Mahout JVM Sparse multiplication time: 2 ms.
            Mahout JCuda Sparse multiplication time: 1 ms.
          • sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .002. 5 runs
            UserSetCUDATestSuite:
            Mahout JVM Sparse multiplication time: 45 ms.
            Mahout JCuda Sparse multiplication time: 10 ms.
            User Defined sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = 0.02 3 runs : 10 ms
          • User Defined sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = 0.02 3 runs
            ```
          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 Tests pass on my system: ``` Mahout JVM Sparse multiplication time: 1914 ms. Mahout JCuda Sparse multiplication time: 195 ms. sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .2. 5 runs Mahout JVM Sparse multiplication time: 43 ms. Mahout JCuda Sparse multiplication time: 11 ms. sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .02. 5 runs Mahout JVM Sparse multiplication time: 2 ms. Mahout JCuda Sparse multiplication time: 1 ms. sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = .002. 5 runs UserSetCUDATestSuite: Mahout JVM Sparse multiplication time: 45 ms. Mahout JCuda Sparse multiplication time: 10 ms. User Defined sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = 0.02 3 runs : 10 ms User Defined sparse mmul at geometry of 1000 x 1000 %*% 1000 x 1000 density = 0.02 3 runs ```
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh @rawkintrevo I intend to have `dense` hammered out on Sunday.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 @nsakharnykh @rawkintrevo I intend to have `dense` hammered out on Sunday.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh , @rawkintrevo, I ran out of time tonight to finish out `dense %*% dense` and `dense %x% sparse`; went down a rabbit hole woth the NVIDIA `c` api docs for cusparse. I noticed that JCuda supported only a single `dense dense` dgemm algorithm, with column major-matrices. Most mahout matrices are row-major, but i began considering the `dense sparse` multiplication, and was slightly thrown off by what seems to be required `csr` compression. it seems that sparse matrices should be compressed as `csc` since the. Anyways I ended up in the LAPACK fortran; apologies for not finishing it up tonight guys, I got off on a long tangent and ran out of time.

          I pushed my beginning work up to my MAHOUT-1974 branch. Nothing really worth looking at right now, but I wil' make a PR against this when I get the `dense`work together.

          Regardless, I should have at least a quick n dirty version ready to go soon, while i work out what we'll need for experiments and benchmarking. We can still discuss and consider different SPARK configurations tomorrow with out `dense` cases. but I'd of course like to get this right.

          As I mentioned on the last call we allow a "Sparse" DRM's in-core components to be both sparse and dense. Currently the threshold for conversion of a DRM block to be changed from a sparse to a dense matrix is pretty high (25% non zero estimate). In the future we will need to allow the user to set the sparsity somehow.

          FYI:
          https://github.com/apache/mahout/blob/master/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala#L431

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 @nsakharnykh , @rawkintrevo, I ran out of time tonight to finish out `dense %*% dense` and `dense %x% sparse`; went down a rabbit hole woth the NVIDIA `c` api docs for cusparse. I noticed that JCuda supported only a single `dense dense` dgemm algorithm, with column major-matrices. Most mahout matrices are row-major, but i began considering the `dense sparse` multiplication, and was slightly thrown off by what seems to be required `csr` compression. it seems that sparse matrices should be compressed as `csc` since the. Anyways I ended up in the LAPACK fortran; apologies for not finishing it up tonight guys, I got off on a long tangent and ran out of time. I pushed my beginning work up to my MAHOUT-1974 branch. Nothing really worth looking at right now, but I wil' make a PR against this when I get the `dense`work together. Regardless, I should have at least a quick n dirty version ready to go soon, while i work out what we'll need for experiments and benchmarking. We can still discuss and consider different SPARK configurations tomorrow with out `dense` cases. but I'd of course like to get this right. As I mentioned on the last call we allow a "Sparse" DRM's in-core components to be both sparse and dense. Currently the threshold for conversion of a DRM block to be changed from a sparse to a dense matrix is pretty high (25% non zero estimate). In the future we will need to allow the user to set the sparsity somehow. FYI: https://github.com/apache/mahout/blob/master/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala#L431
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user nsakharnykh commented on the issue:

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

          @andrewpalumbo regarding column-major: yes, this is the default mode for CUBLAS, sorry I think I didn't mention it in my original email. There are a couple options we can exercise here. 1. We can use transposed versions of `gemm` routines if the input matrices are row-major. I think the output matrix will be always column-major so we'll have to transpose it by using `geam` if we want to keep it in a different format. 2. We can also keep the dense matrices in column-major format on the GPU and move between `csc` and `csr` formats for sparse matrices by using CUSPARSE conversion routines like `csr2csc`. There are also existing API functions in CUSPARSE to convert sparse to dense `csr2dense` and the other way around `dense2csr`. I think we should try to use the available conversion APIs from CUSPARSE as much as possible to avoid writing this on our own.

          Show
          githubbot ASF GitHub Bot added a comment - Github user nsakharnykh commented on the issue: https://github.com/apache/mahout/pull/310 @andrewpalumbo regarding column-major: yes, this is the default mode for CUBLAS, sorry I think I didn't mention it in my original email. There are a couple options we can exercise here. 1. We can use transposed versions of `gemm` routines if the input matrices are row-major. I think the output matrix will be always column-major so we'll have to transpose it by using `geam` if we want to keep it in a different format. 2. We can also keep the dense matrices in column-major format on the GPU and move between `csc` and `csr` formats for sparse matrices by using CUSPARSE conversion routines like `csr2csc`. There are also existing API functions in CUSPARSE to convert sparse to dense `csr2dense` and the other way around `dense2csr`. I think we should try to use the available conversion APIs from CUSPARSE as much as possible to avoid writing this on our own.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on a diff in the pull request:

          https://github.com/apache/mahout/pull/310#discussion_r115131284

          — Diff: cuda/pom.xml —
          @@ -0,0 +1,251 @@
          +<?xml version="1.0" encoding="UTF-8"?>
          +
          +<!--
          + Licensed to the Apache Software Foundation (ASF) under one or more
          + contributor license agreements. See the NOTICE file distributed with
          + this work for additional information regarding copyright ownership.
          + The ASF licenses this file to You under the Apache License, Version 2.0
          + (the "License"); you may not use this file except in compliance with
          + the License. You may obtain a copy of the License at
          +
          + http://www.apache.org/licenses/LICENSE-2.0
          +
          + Unless required by applicable law or agreed to in writing, software
          + distributed under the License is distributed on an "AS IS" BASIS,
          + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + See the License for the specific language governing permissions and
          + limitations under the License.
          +-->
          +
          +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          + <modelVersion>4.0.0</modelVersion>
          +
          + <parent>
          + <groupId>org.apache.mahout</groupId>
          + <artifactId>mahout</artifactId>
          + <version>0.13.0-SNAPSHOT</version>
          — End diff –

          needs to be `0.13.1-SNAPSHOT`

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on a diff in the pull request: https://github.com/apache/mahout/pull/310#discussion_r115131284 — Diff: cuda/pom.xml — @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.mahout</groupId> + <artifactId>mahout</artifactId> + <version>0.13.0-SNAPSHOT</version> — End diff – needs to be `0.13.1-SNAPSHOT`
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user nsakharnykh commented on a diff in the pull request:

          https://github.com/apache/mahout/pull/310#discussion_r115155451

          — Diff: cuda/pom.xml —
          @@ -0,0 +1,251 @@
          +<?xml version="1.0" encoding="UTF-8"?>
          +
          +<!--
          + Licensed to the Apache Software Foundation (ASF) under one or more
          + contributor license agreements. See the NOTICE file distributed with
          + this work for additional information regarding copyright ownership.
          + The ASF licenses this file to You under the Apache License, Version 2.0
          + (the "License"); you may not use this file except in compliance with
          + the License. You may obtain a copy of the License at
          +
          + http://www.apache.org/licenses/LICENSE-2.0
          +
          + Unless required by applicable law or agreed to in writing, software
          + distributed under the License is distributed on an "AS IS" BASIS,
          + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + See the License for the specific language governing permissions and
          + limitations under the License.
          +-->
          +
          +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          + <modelVersion>4.0.0</modelVersion>
          +
          + <parent>
          + <groupId>org.apache.mahout</groupId>
          + <artifactId>mahout</artifactId>
          + <version>0.13.0-SNAPSHOT</version>
          — End diff –

          Done

          Show
          githubbot ASF GitHub Bot added a comment - Github user nsakharnykh commented on a diff in the pull request: https://github.com/apache/mahout/pull/310#discussion_r115155451 — Diff: cuda/pom.xml — @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.mahout</groupId> + <artifactId>mahout</artifactId> + <version>0.13.0-SNAPSHOT</version> — End diff – Done
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh I have my MAHOUT-1974 branch that is almost complete with dense, etc (less the column major issues. We'd discussed just making a PR against this. but It may be easiest if you just went ahead and pushed this to MAHOUT/CUDA, and then I'll make a PR against that, which will be public so that others may comment on it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 @nsakharnykh I have my MAHOUT-1974 branch that is almost complete with dense, etc (less the column major issues. We'd discussed just making a PR against this. but It may be easiest if you just went ahead and pushed this to MAHOUT/CUDA, and then I'll make a PR against that, which will be public so that others may comment on it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh https://github.com/andrewpalumbo/mahout/tree/MAHOUT-1974/cuda ^^

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 @nsakharnykh https://github.com/andrewpalumbo/mahout/tree/MAHOUT-1974/cuda ^^
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user nsakharnykh commented on the issue:

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

          @andrewpalumbo Ok, sounds good. I'll try to push what I have as soon as I have some time in front of my laptop. I'm currently at GTC so my schedule is a bit fragmented.

          Show
          githubbot ASF GitHub Bot added a comment - Github user nsakharnykh commented on the issue: https://github.com/apache/mahout/pull/310 @andrewpalumbo Ok, sounds good. I'll try to push what I have as soon as I have some time in front of my laptop. I'm currently at GTC so my schedule is a bit fragmented.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          Great, thanks. I figured you were there, and very busy, I'll keep working on my end, and there should be no (or few conflicts).. no rush, since my branch is based off of yours.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 Great, thanks. I figured you were there, and very busy, I'll keep working on my end, and there should be no (or few conflicts).. no rush, since my branch is based off of yours.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rawkintrevo commented on the issue:

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

          looking awesome @nsakharnykh @andrewpalumbo

          Before merging, don't forget to fill out
          https://github.com/apache/mahout/blob/master/website/docs/native-solvers/cuda.md

          Show
          githubbot ASF GitHub Bot added a comment - Github user rawkintrevo commented on the issue: https://github.com/apache/mahout/pull/310 looking awesome @nsakharnykh @andrewpalumbo Before merging, don't forget to fill out https://github.com/apache/mahout/blob/master/website/docs/native-solvers/cuda.md
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @rawkintrevo I asked @nsakharnykh to just go ahead and push this to the mahout/CUDA branch, since he's already up at GTC, and we're pushing this through as quickly as possible, and has spotty time to do this. I will immediately open up a [WIP] PR from my https://github.com/andrewpalumbo/mahout/tree/MAHOUT-1974/cuda branch (on top of his) and will fill out the md from there.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/310 @rawkintrevo I asked @nsakharnykh to just go ahead and push this to the mahout/CUDA branch, since he's already up at GTC, and we're pushing this through as quickly as possible, and has spotty time to do this. I will immediately open up a [WIP] PR from my https://github.com/andrewpalumbo/mahout/tree/MAHOUT-1974/cuda branch (on top of his) and will fill out the md from there.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user andrewpalumbo opened a pull request:

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

          [WIP]MAHOUT-1974 (dense cuda multiplication)

              1. Purpose of PR:
                Please give a short description of what this PR is for.
              1. Important ToDos
                Please mark each with an "x"
          • [x ] A JIRA ticket exists (if not, please create this first)https://issues.apache.org/jira/browse/MAHOUT/
          • [x ] Title of PR is "MAHOUT-XXXX Brief Description of Changes" where XXXX is the JIRA number.
          • [ ] Created unit tests where appropriate
          • [ ] Added licenses correct on newly added files
          • [ ] Assigned JIRA to self
          • [ ] Added documentation in scala docs/java docs, and to website
          • [ ] Successfully built and ran all unit tests, verified that all tests pass locally.

          If all of these things aren't complete, but you still feel it is
          appropriate to open a PR, please add [WIP] after MAHOUT-XXXX before the
          descriptions- e.g. "MAHOUT-XXXX [WIP] Description of Change"

          Does this change break earlier versions?

          Is this the beginning of a larger project for which a feature branch should be made?

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

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

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

          https://github.com/apache/mahout/pull/318.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 #318


          commit 9706bb88f3e21ddb910864c85f9d859f9d73708d
          Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com>
          Date: 2017-03-27T19:59:49Z

          Initial version of CUDA bindings using JCuda

          commit ab5e6353cc4abc5ef086bd4326d26e9c909c572f
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-03-30T04:17:59Z

          [WIP]Quick unit test benchmarks.. have not installed cusparse library yet

          commit eaedfceb5378655b5a1a3edfa22b82aaebf7a71c
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T03:10:32Z

          Fix parameter name in comments

          commit 0d0b4e69bdcc28cd203a35ad608e0dbafe93f7ca
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T09:22:52Z

          Added test to read env variables:

          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_N=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_M=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_S=5000
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export DENSITY=.2
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export NUM_RUNS=2
          andy@micheal:~/sandbox/mahout_cuda/cuda$ export SEED=1234

          commit b06678d0dc08b176863e311da59a869c4899974b
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T09:27:47Z

          add default run size (and a timer)

          commit 2cfbf75968fccded1350b7d297bc4195d0034399
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T15:09:34Z

          Fix error in hard coded unit test

          commit 35c540e4eebadfa11f761bc0c61e97db48e840ea
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T15:48:25Z

          Change geometry of test vars for a faster run.

          commit 9cc58a6c8495dd090abbc3609ffcfe5149c59c43
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T17:30:52Z

          add in some verbosity for cuda mmul test

          commit dd561bc577d35b3e30f871b705887af3105f843c
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:09:51Z

          Cosmetic changes to unit tests

          commit cdb6ca002c78f466db09bf9321e070c3546294c9
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:11:11Z

          Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/mahout into AP-UNIT-TEST

          commit e72053df98fc8281952d6fd108696daa5d62afe6
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-06T18:22:43Z

          cosmetic change for user defined variable run

          commit 72bbf131f33dfd84cfbd5478004405dfffc5a966
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-20T04:03:17Z

          Supply default environment settings for tests.

          commit 68e8400fae4d3487f93da8b085e68f4d55bf1e07
          Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com>
          Date: 2017-04-25T19:20:46Z

          Enable exceptions for JCuda libraries

          commit ec686e17ca6ca2fb6b26a6ae4e4e8c4fbe027f64
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-27T18:16:22Z

          Merge branch 'mahout-1974' of https://github.com/nsakharnykh/mahout into MAHOUT-1974

          commit eaddbf06a19b8f347d68756b0f8effe54fd39291
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-04-27T04:43:25Z

          [WIP][nocompile] begining of DenseMatrixem and Dense Dense MMul. Likely ending branch here

          commit 808660d19dcba0b1d1bd8e6f13ed466821fc0196
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-05-01T04:22:49Z

          [WIP][nocompile] out of time tonight. Need to consider wheather JCUDA needs to repacked mahout in-core matrices (row-major) as column major per the wrapped call to NVIDIA cublasDgemm operation. The fact that cusparse uses CSR rather than CSC is somewhat confusing in this case (for e.g. a Dense %*% Sparse JVM level operation

          commit 1674687aee0877eb7720025c8d3eafd6a0c0ba99
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-05-07T03:43:46Z

          WIP: Dense

          commit aa8fdcfa0260e86f8702048d6b5b9777ccbf5aa2
          Author: Andrew Palumbo <apalumbo@apache.org>
          Date: 2017-05-08T03:56:59Z

          [WIP]: late. 2 compilation errors Dense is somewhat solid. Sparse may need to use transposes. need to check values in unit tests, and transpose in dgemm call as needed


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user andrewpalumbo opened a pull request: https://github.com/apache/mahout/pull/318 [WIP] MAHOUT-1974 (dense cuda multiplication) Purpose of PR: Please give a short description of what this PR is for. Important ToDos Please mark each with an "x" [x ] A JIRA ticket exists (if not, please create this first) https://issues.apache.org/jira/browse/MAHOUT/ [x ] Title of PR is "MAHOUT-XXXX Brief Description of Changes" where XXXX is the JIRA number. [ ] Created unit tests where appropriate [ ] Added licenses correct on newly added files [ ] Assigned JIRA to self [ ] Added documentation in scala docs/java docs, and to website [ ] Successfully built and ran all unit tests, verified that all tests pass locally. If all of these things aren't complete, but you still feel it is appropriate to open a PR, please add [WIP] after MAHOUT-XXXX before the descriptions- e.g. "MAHOUT-XXXX [WIP] Description of Change" Does this change break earlier versions? Is this the beginning of a larger project for which a feature branch should be made? You can merge this pull request into a Git repository by running: $ git pull https://github.com/andrewpalumbo/mahout MAHOUT-1974 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/mahout/pull/318.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 #318 commit 9706bb88f3e21ddb910864c85f9d859f9d73708d Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com> Date: 2017-03-27T19:59:49Z Initial version of CUDA bindings using JCuda commit ab5e6353cc4abc5ef086bd4326d26e9c909c572f Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-03-30T04:17:59Z [WIP] Quick unit test benchmarks.. have not installed cusparse library yet commit eaedfceb5378655b5a1a3edfa22b82aaebf7a71c Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T03:10:32Z Fix parameter name in comments commit 0d0b4e69bdcc28cd203a35ad608e0dbafe93f7ca Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T09:22:52Z Added test to read env variables: andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_N=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_M=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SIZE_S=5000 andy@micheal:~/sandbox/mahout_cuda/cuda$ export DENSITY=.2 andy@micheal:~/sandbox/mahout_cuda/cuda$ export NUM_RUNS=2 andy@micheal:~/sandbox/mahout_cuda/cuda$ export SEED=1234 commit b06678d0dc08b176863e311da59a869c4899974b Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T09:27:47Z add default run size (and a timer) commit 2cfbf75968fccded1350b7d297bc4195d0034399 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T15:09:34Z Fix error in hard coded unit test commit 35c540e4eebadfa11f761bc0c61e97db48e840ea Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T15:48:25Z Change geometry of test vars for a faster run. commit 9cc58a6c8495dd090abbc3609ffcfe5149c59c43 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T17:30:52Z add in some verbosity for cuda mmul test commit dd561bc577d35b3e30f871b705887af3105f843c Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:09:51Z Cosmetic changes to unit tests commit cdb6ca002c78f466db09bf9321e070c3546294c9 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:11:11Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/mahout into AP-UNIT-TEST commit e72053df98fc8281952d6fd108696daa5d62afe6 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-06T18:22:43Z cosmetic change for user defined variable run commit 72bbf131f33dfd84cfbd5478004405dfffc5a966 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-20T04:03:17Z Supply default environment settings for tests. commit 68e8400fae4d3487f93da8b085e68f4d55bf1e07 Author: Nikolai Sakharnykh <nsakharnykh@nvidia.com> Date: 2017-04-25T19:20:46Z Enable exceptions for JCuda libraries commit ec686e17ca6ca2fb6b26a6ae4e4e8c4fbe027f64 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-27T18:16:22Z Merge branch 'mahout-1974' of https://github.com/nsakharnykh/mahout into MAHOUT-1974 commit eaddbf06a19b8f347d68756b0f8effe54fd39291 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-04-27T04:43:25Z [WIP] [nocompile] begining of DenseMatrixem and Dense Dense MMul. Likely ending branch here commit 808660d19dcba0b1d1bd8e6f13ed466821fc0196 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-05-01T04:22:49Z [WIP] [nocompile] out of time tonight. Need to consider wheather JCUDA needs to repacked mahout in-core matrices (row-major) as column major per the wrapped call to NVIDIA cublasDgemm operation. The fact that cusparse uses CSR rather than CSC is somewhat confusing in this case (for e.g. a Dense %*% Sparse JVM level operation commit 1674687aee0877eb7720025c8d3eafd6a0c0ba99 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-05-07T03:43:46Z WIP: Dense commit aa8fdcfa0260e86f8702048d6b5b9777ccbf5aa2 Author: Andrew Palumbo <apalumbo@apache.org> Date: 2017-05-08T03:56:59Z [WIP] : late. 2 compilation errors Dense is somewhat solid. Sparse may need to use transposes. need to check values in unit tests, and transpose in dgemm call as needed
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          need to rebase

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/318 need to rebase
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh @pat @rawkintrevo FYI `Sparse Sparse` vlaues are correct, `dense dense` is implemented but untested.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/318 @nsakharnykh @pat @rawkintrevo FYI `Sparse Sparse` vlaues are correct, `dense dense` is implemented but untested.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh sorry for the state of this branch, I tend to commit a lot on this project, and leave a lot of [WIP]s in when jumping around to other branches. Resolved all conflicts the against CUDA branch.. going to start looking at Dense %*% sparse again. First need to read up on `JCublas2._`.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/318 @nsakharnykh sorry for the state of this branch, I tend to commit a lot on this project, and leave a lot of [WIP] s in when jumping around to other branches. Resolved all conflicts the against CUDA branch.. going to start looking at Dense %*% sparse again. First need to read up on `JCublas2._`.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user andrewpalumbo commented on the issue:

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

          @nsakharnykh I think that I'll fix the routing on this (MAHOUT-2004) and then after some cleaning on this, we should be can push to mahout/CUDA.

          Show
          githubbot ASF GitHub Bot added a comment - Github user andrewpalumbo commented on the issue: https://github.com/apache/mahout/pull/318 @nsakharnykh I think that I'll fix the routing on this ( MAHOUT-2004 ) and then after some cleaning on this, we should be can push to mahout/CUDA.

            People

            • Assignee:
              Unassigned
              Reporter:
              nsakharnykh Nikolay Sakharnykh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development