{"action":"created","comment":{"url":"https://api.github.com/repos/apache/arrow/pulls/comments/217154395","pull_request_review_id":154800631,"id":217154395,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzE1NDM5NQ==","diff_hunk":"@@ -0,0 +1,551 @@\n+# Licensed to the Apache Software Foundation (ASF) under one\n+# or more contributor license agreements.  See the NOTICE file\n+# distributed with this work for additional information\n+# regarding copyright ownership.  The ASF licenses this file\n+# to you under the Apache License, Version 2.0 (the\n+# \"License\"); you may not use this file except in compliance\n+# with 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,\n+# software distributed under the License is distributed on an\n+# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+# KIND, either express or implied.  See the License for the\n+# specific language governing permissions and limitations\n+# under the License.\n+\n+\"\"\"\n+UNTESTED:\n+CudaDeviceManager.create_new_context\n+read_message\n+\"\"\"\n+\n+\n+import pytest\n+import pyarrow as pa\n+import numpy as np\n+import sysconfig\n+\n+cuda = pytest.importorskip(\"pyarrow.cuda\")\n+\n+platform = sysconfig.get_platform()\n+# TODO: enable ppc64 when Arrow C++ supports IPC in ppc64 systems:\n+has_ipc_support = platform == 'linux-x86_64'  # or 'ppc64' in platform\n+\n+cuda_ipc = pytest.mark.skipif(\n+    not has_ipc_support,\n+    reason='CUDA IPC not supported in platform `%s`' % (platform))\n+\n+global_context = None  # for flake8\n+\n+\n+def setup_module(module):\n+    module.global_context = cuda.Context(0)\n+\n+\n+def teardown_module(module):\n+    del module.global_context\n+\n+\n+def test_Context():\n+","path":"python/pyarrow/tests/test_cuda.py","position":52,"original_position":52,"commit_id":"4ece8092aea61338c898a21a23b3955322594d7c","original_commit_id":"2126eba8594b41b279e6c34a191d0a1807a03864","user":{"login":"pearu","id":402156,"node_id":"MDQ6VXNlcjQwMjE1Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/402156?v=4","gravatar_id":"","url":"https://api.github.com/users/pearu","html_url":"https://github.com/pearu","followers_url":"https://api.github.com/users/pearu/followers","following_url":"https://api.github.com/users/pearu/following{/other_user}","gists_url":"https://api.github.com/users/pearu/gists{/gist_id}","starred_url":"https://api.github.com/users/pearu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pearu/subscriptions","organizations_url":"https://api.github.com/users/pearu/orgs","repos_url":"https://api.github.com/users/pearu/repos","events_url":"https://api.github.com/users/pearu/events{/privacy}","received_events_url":"https://api.github.com/users/pearu/received_events","type":"User","site_admin":false},"body":"fixed.","created_at":"2018-09-12T19:09:30Z","updated_at":"2018-09-12T19:09:30Z","html_url":"https://github.com/apache/arrow/pull/2536#discussion_r217154395","pull_request_url":"https://api.github.com/repos/apache/arrow/pulls/2536","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments/217154395"},"html":{"href":"https://github.com/apache/arrow/pull/2536#discussion_r217154395"},"pull_request":{"href":"https://api.github.com/repos/apache/arrow/pulls/2536"}},"in_reply_to_id":216724435},"pull_request":{"url":"https://api.github.com/repos/apache/arrow/pulls/2536","id":214330955,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MzMwOTU1","html_url":"https://github.com/apache/arrow/pull/2536","diff_url":"https://github.com/apache/arrow/pull/2536.diff","patch_url":"https://github.com/apache/arrow/pull/2536.patch","issue_url":"https://api.github.com/repos/apache/arrow/issues/2536","number":2536,"state":"open","locked":false,"title":"ARROW-1424: Add CUDA support to pyarrow (WIP)","user":{"login":"pearu","id":402156,"node_id":"MDQ6VXNlcjQwMjE1Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/402156?v=4","gravatar_id":"","url":"https://api.github.com/users/pearu","html_url":"https://github.com/pearu","followers_url":"https://api.github.com/users/pearu/followers","following_url":"https://api.github.com/users/pearu/following{/other_user}","gists_url":"https://api.github.com/users/pearu/gists{/gist_id}","starred_url":"https://api.github.com/users/pearu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pearu/subscriptions","organizations_url":"https://api.github.com/users/pearu/orgs","repos_url":"https://api.github.com/users/pearu/repos","events_url":"https://api.github.com/users/pearu/events{/privacy}","received_events_url":"https://api.github.com/users/pearu/received_events","type":"User","site_admin":false},"body":"This PR implements CUDA support to pyarrow. In order to use it, the Arrow C++ library must be built with the following cmake options:\r\n```\r\n-DARROW_PYTHON=on -DARROW_GPU=ON -DARROW_IPC=ON\r\n```\r\nTo enable CUDA support in pyarrow, it must be built with `--with-cuda` option, e.g.\r\n```\r\npython setup.py build_ext --with-cuda <other options>\r\n```\r\nor the environment must define\r\n```\r\nPYARROW_WITH_CUDA=1\r\n```\r\n\r\nThis CUDA support implementation is rather complete: all Arrow C++ GPU related functions and classes are exposed to Python, the new methods and functions are documented, the test coverage is close to 100%.\r\n\r\nHowever, there are some issues that need to be tackled and questions to be answered (hence the WIP attribute):\r\n1. Is the naming convention of the new methods appropriate? Are there any changes needed in the new API?\r\n2. The IPC test (see `test_IPC` in `python/pyarrow/tests/test_gpu.py`) fails when calling `open_ipc_buffer`: `cuIpcOpenMemHandle fails with code 201` . Currently, I don't know why. Any hint or help on this is much appreciated. [FIXED: using `multiprocessing.Process` in `spawn` mode]\r\n3. Anything else?\r\n","created_at":"2018-09-10T14:19:25Z","updated_at":"2018-09-12T19:09:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"138960f889b4da840f9ae06b80e47d77802e0cac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/arrow/pulls/2536/commits","review_comments_url":"https://api.github.com/repos/apache/arrow/pulls/2536/comments","review_comment_url":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/arrow/issues/2536/comments","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/4ece8092aea61338c898a21a23b3955322594d7c","head":{"label":"Quansight:pearu-cuda-pyarrow","ref":"pearu-cuda-pyarrow","sha":"4ece8092aea61338c898a21a23b3955322594d7c","user":{"login":"Quansight","id":34879953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0ODc5OTUz","avatar_url":"https://avatars0.githubusercontent.com/u/34879953?v=4","gravatar_id":"","url":"https://api.github.com/users/Quansight","html_url":"https://github.com/Quansight","followers_url":"https://api.github.com/users/Quansight/followers","following_url":"https://api.github.com/users/Quansight/following{/other_user}","gists_url":"https://api.github.com/users/Quansight/gists{/gist_id}","starred_url":"https://api.github.com/users/Quansight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quansight/subscriptions","organizations_url":"https://api.github.com/users/Quansight/orgs","repos_url":"https://api.github.com/users/Quansight/repos","events_url":"https://api.github.com/users/Quansight/events{/privacy}","received_events_url":"https://api.github.com/users/Quansight/received_events","type":"Organization","site_admin":false},"repo":{"id":142170260,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxNzAyNjA=","name":"arrow","full_name":"Quansight/arrow","owner":{"login":"Quansight","id":34879953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0ODc5OTUz","avatar_url":"https://avatars0.githubusercontent.com/u/34879953?v=4","gravatar_id":"","url":"https://api.github.com/users/Quansight","html_url":"https://github.com/Quansight","followers_url":"https://api.github.com/users/Quansight/followers","following_url":"https://api.github.com/users/Quansight/following{/other_user}","gists_url":"https://api.github.com/users/Quansight/gists{/gist_id}","starred_url":"https://api.github.com/users/Quansight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quansight/subscriptions","organizations_url":"https://api.github.com/users/Quansight/orgs","repos_url":"https://api.github.com/users/Quansight/repos","events_url":"https://api.github.com/users/Quansight/events{/privacy}","received_events_url":"https://api.github.com/users/Quansight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Quansight/arrow","description":"Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware. It also provides computational libraries and zero-copy streaming messaging and interprocess communication. Languages currently supported include C, C++, Java, JavaScript, Python, and Ruby.","fork":true,"url":"https://api.github.com/repos/Quansight/arrow","forks_url":"https://api.github.com/repos/Quansight/arrow/forks","keys_url":"https://api.github.com/repos/Quansight/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quansight/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quansight/arrow/teams","hooks_url":"https://api.github.com/repos/Quansight/arrow/hooks","issue_events_url":"https://api.github.com/repos/Quansight/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/Quansight/arrow/events","assignees_url":"https://api.github.com/repos/Quansight/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/Quansight/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/Quansight/arrow/tags","blobs_url":"https://api.github.com/repos/Quansight/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quansight/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quansight/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quansight/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quansight/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/Quansight/arrow/languages","stargazers_url":"https://api.github.com/repos/Quansight/arrow/stargazers","contributors_url":"https://api.github.com/repos/Quansight/arrow/contributors","subscribers_url":"https://api.github.com/repos/Quansight/arrow/subscribers","subscription_url":"https://api.github.com/repos/Quansight/arrow/subscription","commits_url":"https://api.github.com/repos/Quansight/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quansight/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quansight/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quansight/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quansight/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/Quansight/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quansight/arrow/merges","archive_url":"https://api.github.com/repos/Quansight/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quansight/arrow/downloads","issues_url":"https://api.github.com/repos/Quansight/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/Quansight/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/Quansight/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/Quansight/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quansight/arrow/labels{/name}","releases_url":"https://api.github.com/repos/Quansight/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/Quansight/arrow/deployments","created_at":"2018-07-24T14:29:31Z","updated_at":"2018-08-28T20:56:37Z","pushed_at":"2018-09-12T13:26:54Z","git_url":"git://github.com/Quansight/arrow.git","ssh_url":"git@github.com:Quansight/arrow.git","clone_url":"https://github.com/Quansight/arrow.git","svn_url":"https://github.com/Quansight/arrow","homepage":"https://arrow.apache.org","size":17116,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"a42d4bf1b0cef37849be0b019c34c96bf56a62f9","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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":51905353,"node_id":"MDEwOlJlcG9zaXRvcnk1MTkwNTM1Mw==","name":"arrow","full_name":"apache/arrow","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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/arrow","description":"Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware. It also provides computational libraries and zero-copy streaming messaging and interprocess communication. Languages currently supported include C, C++, Java, JavaScript, Python, and Ruby.","fork":false,"url":"https://api.github.com/repos/apache/arrow","forks_url":"https://api.github.com/repos/apache/arrow/forks","keys_url":"https://api.github.com/repos/apache/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/arrow/teams","hooks_url":"https://api.github.com/repos/apache/arrow/hooks","issue_events_url":"https://api.github.com/repos/apache/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/apache/arrow/events","assignees_url":"https://api.github.com/repos/apache/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/apache/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/apache/arrow/tags","blobs_url":"https://api.github.com/repos/apache/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/arrow/languages","stargazers_url":"https://api.github.com/repos/apache/arrow/stargazers","contributors_url":"https://api.github.com/repos/apache/arrow/contributors","subscribers_url":"https://api.github.com/repos/apache/arrow/subscribers","subscription_url":"https://api.github.com/repos/apache/arrow/subscription","commits_url":"https://api.github.com/repos/apache/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/apache/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/arrow/merges","archive_url":"https://api.github.com/repos/apache/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/arrow/downloads","issues_url":"https://api.github.com/repos/apache/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/apache/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/arrow/labels{/name}","releases_url":"https://api.github.com/repos/apache/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/apache/arrow/deployments","created_at":"2016-02-17T08:00:23Z","updated_at":"2018-09-12T17:25:58Z","pushed_at":"2018-09-12T15:56:50Z","git_url":"git://github.com/apache/arrow.git","ssh_url":"git@github.com:apache/arrow.git","clone_url":"https://github.com/apache/arrow.git","svn_url":"https://github.com/apache/arrow","homepage":"https://arrow.apache.org","size":17074,"stargazers_count":2444,"watchers_count":2444,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":649,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":649,"open_issues":51,"watchers":2444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/2536"},"html":{"href":"https://github.com/apache/arrow/pull/2536"},"issue":{"href":"https://api.github.com/repos/apache/arrow/issues/2536"},"comments":{"href":"https://api.github.com/repos/apache/arrow/issues/2536/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/arrow/pulls/2536/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/arrow/pulls/2536/commits"},"statuses":{"href":"https://api.github.com/repos/apache/arrow/statuses/4ece8092aea61338c898a21a23b3955322594d7c"}},"author_association":"NONE"}}
{"actor":{"display_login":"pearu"}}