{"action":"created","comment":{"url":"https://api.github.com/repos/apache/mahout/pulls/comments/82934625","pull_request_review_id":3805200,"id":82934625,"diff_hunk":"@@ -0,0 +1,448 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.apache.mahout.viennacl.openmp\n+\n+import org.apache.mahout.logging._\n+import org.apache.mahout.math\n+import org.apache.mahout.math._\n+import org.apache.mahout.math.flavor.{BackEnum, TraversingStructureEnum}\n+import org.apache.mahout.math.function.Functions\n+import org.apache.mahout.math.scalabindings.RLikeOps._\n+import org.apache.mahout.math.scalabindings._\n+import org.apache.mahout.viennacl.openmp.javacpp.Functions._\n+import org.apache.mahout.viennacl.openmp.javacpp.LinalgFunctions._\n+import org.apache.mahout.viennacl.openmp.javacpp.{CompressedMatrix, Context, DenseRowMatrix}\n+\n+import scala.collection.JavaConversions._\n+\n+object OMPMMul extends MMBinaryFunc {","path":"viennacl-omp/src/main/scala/org/apache/mahout/viennacl/openmp/OMPMMul.scala","position":33,"original_position":33,"commit_id":"df563d67acee50eac529ae2ee022c3d0dd7fe3a9","original_commit_id":"9d04b6ecc469e87dc71481ac7b162664d770febb","user":{"login":"dlyubimov","id":523263,"avatar_url":"https://avatars.githubusercontent.com/u/523263?v=3","gravatar_id":"","url":"https://api.github.com/users/dlyubimov","html_url":"https://github.com/dlyubimov","followers_url":"https://api.github.com/users/dlyubimov/followers","following_url":"https://api.github.com/users/dlyubimov/following{/other_user}","gists_url":"https://api.github.com/users/dlyubimov/gists{/gist_id}","starred_url":"https://api.github.com/users/dlyubimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlyubimov/subscriptions","organizations_url":"https://api.github.com/users/dlyubimov/orgs","repos_url":"https://api.github.com/users/dlyubimov/repos","events_url":"https://api.github.com/users/dlyubimov/events{/privacy}","received_events_url":"https://api.github.com/users/dlyubimov/received_events","type":"User","site_admin":false},"body":"ok so likely it is WIP again, but we wanted a cache here. So i think on one hand it needs a specific proxy matrix type; on the other, it doesn't need all these mappings based on argument orientation. \r\n\r\nOn the latter point in particualr, since we are going to a native solver, we are rewriting (copyign) data anyway, so we already have ok'd the fact that rewrite is less expensive than mmul itself. \r\n\r\nMany solvers will accept whatever orientation of arguments (can't immediately remember if it is the case with VCL OMP), and even if they do not, we just simply can copy it to whatever orientation is needed.\r\n\r\nso i think all this matching eventually would be irrelevant really.","created_at":"2016-10-12T04:30:31Z","updated_at":"2016-10-12T04:35:42Z","html_url":"https://github.com/apache/mahout/pull/261#discussion_r82934625","pull_request_url":"https://api.github.com/repos/apache/mahout/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/apache/mahout/pulls/comments/82934625"},"html":{"href":"https://github.com/apache/mahout/pull/261#discussion_r82934625"},"pull_request":{"href":"https://api.github.com/repos/apache/mahout/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/apache/mahout/pulls/261","id":88600877,"html_url":"https://github.com/apache/mahout/pull/261","diff_url":"https://github.com/apache/mahout/pull/261.diff","patch_url":"https://github.com/apache/mahout/pull/261.patch","issue_url":"https://api.github.com/repos/apache/mahout/issues/261","number":261,"state":"open","locked":false,"title":"MAHOUT-1885 [WIP][FOR COMMENT]: Inital implementation of VCL bindings for mahout math.","user":{"login":"andrewpalumbo","id":7681565,"avatar_url":"https://avatars.githubusercontent.com/u/7681565?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewpalumbo","html_url":"https://github.com/andrewpalumbo","followers_url":"https://api.github.com/users/andrewpalumbo/followers","following_url":"https://api.github.com/users/andrewpalumbo/following{/other_user}","gists_url":"https://api.github.com/users/andrewpalumbo/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpalumbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpalumbo/subscriptions","organizations_url":"https://api.github.com/users/andrewpalumbo/orgs","repos_url":"https://api.github.com/users/andrewpalumbo/repos","events_url":"https://api.github.com/users/andrewpalumbo/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpalumbo/received_events","type":"User","site_admin":false},"body":"This is an initial set of bindings for VCL to mahout matrices.  Currently supports `DenseRowMatrix` and `SparseRowMatrix` for both GPU and multi-threaded CPU.\r\n\r\nNote that there are two new modules:  `viennacl` and `viennacl-omp`  there are new profiles to activate these: `-Pvienniacl` activates both and  `-Pviennacl-omp` activates only the OpenMP version.\r\n\r\nThe default build should not require any new installs.\r\n\r\nIf activating either version you'll need to install viennacl 1.7.1+ \r\n\r\nOn ubuntu 16.04 this is simply:\r\n```\r\nsudo apt-get install libviennacl-dev\r\n```\r\nif running on GPU you'll also need, you'll need to have OpenCL 1.2+, which is likely installed with your video driver.\r\n\r\nHadoop2 is still in a profile which needs to be removed, so the command to install for GPU and CPU is:\r\n```\r\nmvn clean install -Pviennacl -Phadoop2 -DskipTests && mvn test\r\n```\r\nfor OpenMP only  (mac users) :\r\n```\r\nmvn clean install -Pviennacl -Phadoop2 -DskipTests && mvn test\r\n```\r\n\r\nThe output is still very verbose and will let you know each time a `%*%` operatoion is made which device it is made on.\r\n\r\nA few todos:\r\n\r\n1.  Not sure that we need two separate modules for omp and gpu.  There may be a way to handle this with environment variables. \r\n2. Currently a new object is being created each time `%*%` is called.  it would be best to create these once and then cache them for subsequent calls.\r\n3.  Currently using try/catch for `XXXMMul` creation, really bad style.\r\n4.  GPU Vector are not working and throw exceptions when trying to read data out of them\r\n   - Vector this we could implement at least one native linear solver. (most viennacl linear solvers require boost however this is slated for removal on the next release).\r\n5.  Have been noticing intermittent crashes on GPU.\r\n6.  Tests with CLI drivers are currently commented out.  Was getting odd non-numeric failures with them.  must be a config issue.\r\n7.  Currently each operation can only be run on one GPU /node.\r\n  - We need to run on more than one GPU/machine\r\n\r\nI'd like to get this committed relatively quickly and then go back and fine tune.\r\n\r\nAny feedback is much appreciated. \r\n","created_at":"2016-10-10T00:33:06Z","updated_at":"2016-10-12T04:35:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eafbf310a98f6a112c2bd3e16a9146ec1c258833","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/mahout/pulls/261/commits","review_comments_url":"https://api.github.com/repos/apache/mahout/pulls/261/comments","review_comment_url":"https://api.github.com/repos/apache/mahout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/mahout/issues/261/comments","statuses_url":"https://api.github.com/repos/apache/mahout/statuses/df563d67acee50eac529ae2ee022c3d0dd7fe3a9","head":{"label":"andrewpalumbo:viennacl-opmmul-a","ref":"viennacl-opmmul-a","sha":"df563d67acee50eac529ae2ee022c3d0dd7fe3a9","user":{"login":"andrewpalumbo","id":7681565,"avatar_url":"https://avatars.githubusercontent.com/u/7681565?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewpalumbo","html_url":"https://github.com/andrewpalumbo","followers_url":"https://api.github.com/users/andrewpalumbo/followers","following_url":"https://api.github.com/users/andrewpalumbo/following{/other_user}","gists_url":"https://api.github.com/users/andrewpalumbo/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpalumbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpalumbo/subscriptions","organizations_url":"https://api.github.com/users/andrewpalumbo/orgs","repos_url":"https://api.github.com/users/andrewpalumbo/repos","events_url":"https://api.github.com/users/andrewpalumbo/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpalumbo/received_events","type":"User","site_admin":false},"repo":{"id":20104421,"name":"mahout","full_name":"andrewpalumbo/mahout","owner":{"login":"andrewpalumbo","id":7681565,"avatar_url":"https://avatars.githubusercontent.com/u/7681565?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewpalumbo","html_url":"https://github.com/andrewpalumbo","followers_url":"https://api.github.com/users/andrewpalumbo/followers","following_url":"https://api.github.com/users/andrewpalumbo/following{/other_user}","gists_url":"https://api.github.com/users/andrewpalumbo/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpalumbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpalumbo/subscriptions","organizations_url":"https://api.github.com/users/andrewpalumbo/orgs","repos_url":"https://api.github.com/users/andrewpalumbo/repos","events_url":"https://api.github.com/users/andrewpalumbo/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpalumbo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewpalumbo/mahout","description":"Mirror of Apache Mahout","fork":true,"url":"https://api.github.com/repos/andrewpalumbo/mahout","forks_url":"https://api.github.com/repos/andrewpalumbo/mahout/forks","keys_url":"https://api.github.com/repos/andrewpalumbo/mahout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewpalumbo/mahout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewpalumbo/mahout/teams","hooks_url":"https://api.github.com/repos/andrewpalumbo/mahout/hooks","issue_events_url":"https://api.github.com/repos/andrewpalumbo/mahout/issues/events{/number}","events_url":"https://api.github.com/repos/andrewpalumbo/mahout/events","assignees_url":"https://api.github.com/repos/andrewpalumbo/mahout/assignees{/user}","branches_url":"https://api.github.com/repos/andrewpalumbo/mahout/branches{/branch}","tags_url":"https://api.github.com/repos/andrewpalumbo/mahout/tags","blobs_url":"https://api.github.com/repos/andrewpalumbo/mahout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewpalumbo/mahout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewpalumbo/mahout/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewpalumbo/mahout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewpalumbo/mahout/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewpalumbo/mahout/languages","stargazers_url":"https://api.github.com/repos/andrewpalumbo/mahout/stargazers","contributors_url":"https://api.github.com/repos/andrewpalumbo/mahout/contributors","subscribers_url":"https://api.github.com/repos/andrewpalumbo/mahout/subscribers","subscription_url":"https://api.github.com/repos/andrewpalumbo/mahout/subscription","commits_url":"https://api.github.com/repos/andrewpalumbo/mahout/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewpalumbo/mahout/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewpalumbo/mahout/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewpalumbo/mahout/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewpalumbo/mahout/contents/{+path}","compare_url":"https://api.github.com/repos/andrewpalumbo/mahout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewpalumbo/mahout/merges","archive_url":"https://api.github.com/repos/andrewpalumbo/mahout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewpalumbo/mahout/downloads","issues_url":"https://api.github.com/repos/andrewpalumbo/mahout/issues{/number}","pulls_url":"https://api.github.com/repos/andrewpalumbo/mahout/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewpalumbo/mahout/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewpalumbo/mahout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewpalumbo/mahout/labels{/name}","releases_url":"https://api.github.com/repos/andrewpalumbo/mahout/releases{/id}","deployments_url":"https://api.github.com/repos/andrewpalumbo/mahout/deployments","created_at":"2014-05-23T15:27:45Z","updated_at":"2016-02-06T19:57:08Z","pushed_at":"2016-10-12T04:15:29Z","git_url":"git://github.com/andrewpalumbo/mahout.git","ssh_url":"git@github.com:andrewpalumbo/mahout.git","clone_url":"https://github.com/andrewpalumbo/mahout.git","svn_url":"https://github.com/andrewpalumbo/mahout","homepage":null,"size":42918,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"1f5e36f249aabc68495ec15f64f5ed6754d9f1e2","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20089859,"name":"mahout","full_name":"apache/mahout","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/mahout","description":"Mirror of Apache Mahout","fork":false,"url":"https://api.github.com/repos/apache/mahout","forks_url":"https://api.github.com/repos/apache/mahout/forks","keys_url":"https://api.github.com/repos/apache/mahout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/mahout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/mahout/teams","hooks_url":"https://api.github.com/repos/apache/mahout/hooks","issue_events_url":"https://api.github.com/repos/apache/mahout/issues/events{/number}","events_url":"https://api.github.com/repos/apache/mahout/events","assignees_url":"https://api.github.com/repos/apache/mahout/assignees{/user}","branches_url":"https://api.github.com/repos/apache/mahout/branches{/branch}","tags_url":"https://api.github.com/repos/apache/mahout/tags","blobs_url":"https://api.github.com/repos/apache/mahout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/mahout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/mahout/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/mahout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/mahout/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/mahout/languages","stargazers_url":"https://api.github.com/repos/apache/mahout/stargazers","contributors_url":"https://api.github.com/repos/apache/mahout/contributors","subscribers_url":"https://api.github.com/repos/apache/mahout/subscribers","subscription_url":"https://api.github.com/repos/apache/mahout/subscription","commits_url":"https://api.github.com/repos/apache/mahout/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/mahout/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/mahout/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/mahout/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/mahout/contents/{+path}","compare_url":"https://api.github.com/repos/apache/mahout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/mahout/merges","archive_url":"https://api.github.com/repos/apache/mahout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/mahout/downloads","issues_url":"https://api.github.com/repos/apache/mahout/issues{/number}","pulls_url":"https://api.github.com/repos/apache/mahout/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/mahout/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/mahout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/mahout/labels{/name}","releases_url":"https://api.github.com/repos/apache/mahout/releases{/id}","deployments_url":"https://api.github.com/repos/apache/mahout/deployments","created_at":"2014-05-23T07:00:07Z","updated_at":"2016-10-10T17:59:01Z","pushed_at":"2016-10-12T04:15:30Z","git_url":"git://github.com/apache/mahout.git","ssh_url":"git@github.com:apache/mahout.git","clone_url":"https://github.com/apache/mahout.git","svn_url":"https://github.com/apache/mahout","homepage":null,"size":52245,"stargazers_count":922,"watchers_count":922,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":668,"mirror_url":"git://git.apache.org/mahout.git","open_issues_count":16,"forks":668,"open_issues":16,"watchers":922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/mahout/pulls/261"},"html":{"href":"https://github.com/apache/mahout/pull/261"},"issue":{"href":"https://api.github.com/repos/apache/mahout/issues/261"},"comments":{"href":"https://api.github.com/repos/apache/mahout/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/mahout/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/mahout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/mahout/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/apache/mahout/statuses/df563d67acee50eac529ae2ee022c3d0dd7fe3a9"}}}}
{"actor":{"display_login":"dlyubimov"}}