{"action":"created","comment":{"url":"https://api.github.com/repos/cupy/cupy/pulls/comments/189929637","pull_request_review_id":122202287,"id":189929637,"diff_hunk":"@@ -0,0 +1,249 @@\n+from cython.operator cimport dereference\n+\n+cimport cpython\n+from cpython cimport pycapsule\n+\n+from libc cimport stdlib\n+from libc.stdint cimport uint8_t\n+from libc.stdint cimport uint16_t\n+from libc.stdint cimport int64_t\n+from libc.stdint cimport uint64_t\n+from libcpp.vector cimport vector\n+\n+import cupy\n+from cupy.core.core cimport ndarray\n+from cupy.cuda cimport device as device_mod\n+from cupy.cuda cimport memory\n+\n+\n+cdef enum DLDeviceType:\n+    kDLCPU = 1\n+    kDLGPU = 2\n+    kDLCPUPinned = 3\n+    kDLOpenCL = 4\n+    kDLMetal = 8\n+    kDLVPI = 9\n+    kDLROCM = 10\n+\n+\n+cdef struct DLContext:\n+    DLDeviceType device_type\n+    int device_id\n+\n+\n+cdef enum DLDataTypeCode:\n+    kDLInt = <unsigned int>0\n+    kDLUInt = <unsigned int>1\n+    kDLFloat = <unsigned int>2\n+\n+\n+cdef struct DLDataType:\n+    uint8_t code\n+    uint8_t bits\n+    uint16_t lanes\n+\n+\n+cdef struct DLTensor:\n+    size_t data  # Safer than \"void *\"\n+    DLContext ctx\n+    int ndim\n+    DLDataType dtype\n+    int64_t* shape\n+    int64_t* strides\n+    uint64_t byte_offset\n+\n+\n+cdef struct DLManagedTensor:\n+    DLTensor dl_tensor\n+    void* manager_ctx\n+    void(*deleter)(DLManagedTensor*)\n+\n+\n+cdef void pycapsule_deleter(object dltensor):\n+    cdef DLManagedTensor* dlm_tensor\n+    try:\n+        dlm_tensor = <DLManagedTensor *>pycapsule.PyCapsule_GetPointer(\n+            dltensor, 'used_dltensor')\n+    except Exception:\n+        dlm_tensor = <DLManagedTensor *>pycapsule.PyCapsule_GetPointer(\n+            dltensor, 'dltensor')\n+    deleter(dlm_tensor)\n+\n+\n+cdef void deleter(DLManagedTensor* tensor) with gil:\n+    if tensor.manager_ctx is NULL:\n+        return\n+    stdlib.free(tensor.dl_tensor.shape)\n+    cpython.Py_DECREF(<ndarray>tensor.manager_ctx)\n+    stdlib.free(tensor)\n+    tensor.manager_ctx = NULL\n+\n+\n+# The name of this function is following the framwork integration guide of\n+# TensorComprehensions.\n+cpdef object toDlpack(ndarray array):\n+    cdef DLManagedTensor* dlm_tensor = \\\n+        <DLManagedTensor*>stdlib.malloc(sizeof(DLManagedTensor))\n+\n+    cdef size_t ndim = array._shape.size()\n+    cdef DLTensor* dl_tensor = &dlm_tensor.dl_tensor\n+    dl_tensor.data = array.data.ptr\n+    dl_tensor.ndim = ndim\n+\n+    cdef int64_t* shape_strides = \\\n+        <int64_t*>stdlib.malloc(ndim * sizeof(int64_t) * 2)\n+    for n in range(ndim):\n+        shape_strides[n] = array._shape[n]\n+    dl_tensor.shape = shape_strides\n+    for n in range(ndim):\n+        shape_strides[n + ndim] = array._strides[n] // array.dtype.itemsize\n+\n+    dl_tensor.strides = shape_strides + ndim\n+    dl_tensor.byte_offset = 0\n+\n+    cdef DLContext* ctx = &dl_tensor.ctx\n+    ctx.device_type = DLDeviceType.kDLGPU\n+    ctx.device_id = array.device.id\n+\n+    cdef DLDataType* dtype = &dl_tensor.dtype\n+    if array.dtype.kind == 'u':\n+        dtype.code = <uint8_t>DLDataTypeCode.kDLUInt\n+    elif array.dtype.kind == 'i':\n+        dtype.code = <uint8_t>DLDataTypeCode.kDLInt\n+    elif array.dtype.kind == 'f':\n+        dtype.code = <uint8_t>DLDataTypeCode.kDLFloat\n+    else:\n+        raise ValueError('Unknown dtype')\n+    dtype.bits = <uint8_t>(array.dtype.itemsize * 8)\n+    dtype.lanes = <uint16_t>1\n+\n+    dlm_tensor.manager_ctx = <void *>array\n+    cpython.Py_INCREF(array)\n+    dlm_tensor.deleter = deleter\n+\n+    return pycapsule.PyCapsule_New(dlm_tensor, 'dltensor', pycapsule_deleter)\n+\n+\n+cdef class DLPackMemory(memory.Memory):\n+\n+    \"\"\"Memory object for a dlpack tensor.\n+\n+    This does not allocate any memory.\n+\n+    \"\"\"\n+\n+    cdef DLManagedTensor* dlm_tensor\n+    cdef object dltensor\n+\n+    def __init__(self, object dltensor):\n+        self.dltensor = dltensor\n+        self.dlm_tensor = <DLManagedTensor *>pycapsule.PyCapsule_GetPointer(\n+            dltensor, 'dltensor')\n+        self.device = cupy.cuda.Device(self.dlm_tensor.dl_tensor.ctx.device_id)\n+        self.ptr = self.dlm_tensor.dl_tensor.data\n+        cdef int n = 0\n+        cdef int ndim = self.dlm_tensor.dl_tensor.ndim\n+        cdef int64_t* shape = self.dlm_tensor.dl_tensor.shape\n+        for s in shape[:ndim]:\n+            n += s\n+        self.size = self.dlm_tensor.dl_tensor.dtype.bits * n // 8\n+\n+        # Make sure this capsule will never be used again.\n+        pycapsule.PyCapsule_SetName(dltensor, 'used_dltensor')\n+\n+    def __dealloc__(self):\n+        # DLPack tensor should be managed by the original creator\n+        self.ptr = 0\n+\n+\n+# The name of this function is following the framwork integration guide of\n+# TensorComprehensions.\n+cpdef ndarray fromDlpack(object dltensor):\n+    \"\"\"Zero-copy conversion from a DLPack tensor to a :class:`~cupy.ndarray`.\n+\n+    DLPack is a open in memory tensor structure proposed in this repository:\n+    `dmlc/dlpack <https://github.com/dmlc/dlpack>`_.\n+\n+    This function takes a :class:`PyCapsule` object which contains a pointer to\n+    a DLPack tensor as input, and returns a :class:`~cupy.ndarray`. This\n+    function does not copy the data in the DLPack tensor but both\n+    DLPack tensor and :class:`~cupy.ndarray` have pointers which are pointing\n+    to the same memory region for the data.\n+\n+    Args:\n+        dltensor (:class:`PyCapsule`): Input DLPack tensor which is\n+            encapsulated in a :class:`PyCapsule` object.\n+\n+    Returns:\n+        array (:class:`~cupy.ndarray`): A CuPy ndarray.\n+\n+    .. seealso::\n+\n+        :meth:`cupy.ndarray.toDlpack` is a method for zero-copy conversion\n+        from a :class:`~cupy.ndarray` to a DLPack tensor (which is encapsulated\n+        in a :class:`PyCapsule` object).\n+\n+    .. admonition:: Example\n+\n+        >>> import cupy\n+        >>> array1 = cupy.array([0, 1, 2], dtype=cupy.float32)\n+        >>> dltensor = array1.toDlpack()\n+        ... # doctest: +ELLIPSIS\n+        <capsule object \"dltensor\" at ...>\n+        >>> array2 = cupy.fromDlpack(dltensor)\n+        >>> cupy.testing.assert_array_equal(array1, array2)\n+\n+    \"\"\"\n+    mem = DLPackMemory(dltensor)\n+\n+    cdef DLDataType dtype = mem.dlm_tensor.dl_tensor.dtype\n+    if dtype.code == DLDataTypeCode.kDLUInt:\n+        if dtype.bits == 8:","path":"cupy/core/dlpack.pyx","position":201,"original_position":201,"commit_id":"3029e1026cd5ce92509ed8dc040648d9e4c47a42","original_commit_id":"3029e1026cd5ce92509ed8dc040648d9e4c47a42","user":{"login":"okuta","id":7133388,"avatar_url":"https://avatars1.githubusercontent.com/u/7133388?v=4","gravatar_id":"","url":"https://api.github.com/users/okuta","html_url":"https://github.com/okuta","followers_url":"https://api.github.com/users/okuta/followers","following_url":"https://api.github.com/users/okuta/following{/other_user}","gists_url":"https://api.github.com/users/okuta/gists{/gist_id}","starred_url":"https://api.github.com/users/okuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okuta/subscriptions","organizations_url":"https://api.github.com/users/okuta/orgs","repos_url":"https://api.github.com/users/okuta/repos","events_url":"https://api.github.com/users/okuta/events{/privacy}","received_events_url":"https://api.github.com/users/okuta/received_events","type":"User","site_admin":false},"body":"Please use local variable `cdef int bits = dtype.bits` .","created_at":"2018-05-22T14:46:02Z","updated_at":"2018-05-22T14:47:35Z","html_url":"https://github.com/cupy/cupy/pull/1082#discussion_r189929637","pull_request_url":"https://api.github.com/repos/cupy/cupy/pulls/1082","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cupy/cupy/pulls/comments/189929637"},"html":{"href":"https://github.com/cupy/cupy/pull/1082#discussion_r189929637"},"pull_request":{"href":"https://api.github.com/repos/cupy/cupy/pulls/1082"}}},"pull_request":{"url":"https://api.github.com/repos/cupy/cupy/pulls/1082","id":178764714,"html_url":"https://github.com/cupy/cupy/pull/1082","diff_url":"https://github.com/cupy/cupy/pull/1082.diff","patch_url":"https://github.com/cupy/cupy/pull/1082.patch","issue_url":"https://api.github.com/repos/cupy/cupy/issues/1082","number":1082,"state":"open","locked":false,"title":"Support DLPack","user":{"login":"mitmul","id":666535,"avatar_url":"https://avatars0.githubusercontent.com/u/666535?v=4","gravatar_id":"","url":"https://api.github.com/users/mitmul","html_url":"https://github.com/mitmul","followers_url":"https://api.github.com/users/mitmul/followers","following_url":"https://api.github.com/users/mitmul/following{/other_user}","gists_url":"https://api.github.com/users/mitmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmul/subscriptions","organizations_url":"https://api.github.com/users/mitmul/orgs","repos_url":"https://api.github.com/users/mitmul/repos","events_url":"https://api.github.com/users/mitmul/events{/privacy}","received_events_url":"https://api.github.com/users/mitmul/received_events","type":"User","site_admin":false},"body":"This PR resolves #983.\r\n\r\nThis PR adds a method `toDLPack` to CuPy ndarray. `toDLPack` method returns PyCapsule.\r\nThis PR also adds `cupy.fromDLPack` method to convert DLPack tensor into CuPy's ndarray.\r\n\r\n### CuPy <-> PyTorch tensor\r\n\r\nThis enables to convert CuPy arrays to PyTorch tensors, and vice versa.\r\n\r\n#### PyTorch -> CuPy\r\n```\r\nimport torch\r\nimport cupy\r\n\r\nfrom torch.utils.dlpack import to_dlpack\r\nfrom torch.utils.dlpack import from_dlpack\r\n\r\n# ---------------------------------------\r\n# PyTorch -> CuPy\r\n# ---------------------------------------\r\n\r\n# Create a PyTorch tensor\r\ntx = torch.randn(1, 2, 3, 4).cuda()\r\nprint(tx)\r\n\r\n# Convert it into a dlpack tensor\r\nt1 = to_dlpack(tx)\r\n\r\n# Convert it further into a CuPy array\r\ncx = cupy.fromDlpack(t1)\r\nprint(cx)\r\n```\r\nOutput:\r\n```\r\ntensor([[[[-1.0013,  1.1196, -1.0771, -0.7612],\r\n          [ 1.4412, -0.7757,  0.1054,  0.8019],\r\n          [ 0.1014, -0.2111,  0.9335, -0.8446]],\r\n\r\n         [[ 0.0085,  0.7669, -1.0250,  3.3684],\r\n          [-0.1365,  0.1029,  0.2827,  0.0307],\r\n          [-1.0236,  1.4164,  0.9975,  0.8236]]]], device='cuda:0')\r\n[[[[-1.0012635   1.11960101 -1.07713795 -0.76120251]\r\n   [ 1.4411695  -0.77568114  0.1054479   0.80189544]\r\n   [ 0.10137261 -0.21112843  0.93348098 -0.84461737]]\r\n\r\n  [[ 0.0085327   0.76691639 -1.02497101  3.36835527]\r\n   [-0.13651586  0.10294367  0.28265193  0.03072196]\r\n   [-1.02356339  1.41642499  0.99751163  0.82362241]]]]\r\n```\r\n\r\n#### CuPy -> PyTorch\r\n\r\n```\r\n# --------------------------------------\r\n# CuPy -> PyTorch\r\n# --------------------------------------\r\n\r\nca = cupy.random.randn(1, 2, 3, 4).astype(cupy.float32)\r\nprint(ca)\r\n\r\nt2 = ca.toDlpack()\r\n\r\ncb = from_dlpack(t2)\r\nprint(cb)\r\n```\r\nOutput:\r\n```\r\n[[[[-1.85036588  0.40208972  1.1292758  -0.7116102 ]\r\n   [ 0.16188958  0.39067528  2.11596918  0.27136478]\r\n   [-0.6051448   0.58887625 -1.22710478 -0.90009344]]\r\n\r\n  [[-1.31603026 -0.30327141 -0.28411245  0.32678974]\r\n   [-1.0101825   0.19829388 -0.35092002  0.24203797]\r\n   [-0.30412203  2.31131864  1.43144453  0.45414579]]]]\r\ntensor([[[[-1.8504,  0.4021,  1.1293, -0.7116],\r\n          [ 0.1619,  0.3907,  2.1160,  0.2714],\r\n          [-0.6051,  0.5889, -1.2271, -0.9001]],\r\n\r\n         [[-1.3160, -0.3033, -0.2841,  0.3268],\r\n          [-1.0102,  0.1983, -0.3509,  0.2420],\r\n          [-0.3041,  2.3113,  1.4314,  0.4541]]]], device='cuda:0')\r\n```\r\n\r\n### TODO\r\n\r\n- [x] Implement `toDLPack` method\r\n- [x] Implement `fromDLPack` method\r\n- [x] Add tests\r\n- [x] Add documents\r\n- [x] Add comments (why we use `toDlpack` and `fromDlpack` for the names of the functions: ref. https://facebookresearch.github.io/TensorComprehensions/integrating_any_ml_framework.html)\r\n\r\n### Discussion\r\n\r\n- ~Who is responsible for managing the memory region of a DLTensor after we use `fromDLPack` to make a CuPy ndarray from it? The DLTensor might be created by another framework. (ref: https://github.com/dmlc/dlpack/issues/18)~\r\n\r\n### Reference\r\n\r\n- Implementation in ATen: https://github.com/zdevito/ATen/blob/master/src/ATen/DLConvertor.cpp","created_at":"2018-04-02T03:05:41Z","updated_at":"2018-05-22T14:47:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2f279c35f66d641580658190c27001dd838a78b","assignee":{"login":"okuta","id":7133388,"avatar_url":"https://avatars1.githubusercontent.com/u/7133388?v=4","gravatar_id":"","url":"https://api.github.com/users/okuta","html_url":"https://github.com/okuta","followers_url":"https://api.github.com/users/okuta/followers","following_url":"https://api.github.com/users/okuta/following{/other_user}","gists_url":"https://api.github.com/users/okuta/gists{/gist_id}","starred_url":"https://api.github.com/users/okuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okuta/subscriptions","organizations_url":"https://api.github.com/users/okuta/orgs","repos_url":"https://api.github.com/users/okuta/repos","events_url":"https://api.github.com/users/okuta/events{/privacy}","received_events_url":"https://api.github.com/users/okuta/received_events","type":"User","site_admin":false},"assignees":[{"login":"okuta","id":7133388,"avatar_url":"https://avatars1.githubusercontent.com/u/7133388?v=4","gravatar_id":"","url":"https://api.github.com/users/okuta","html_url":"https://github.com/okuta","followers_url":"https://api.github.com/users/okuta/followers","following_url":"https://api.github.com/users/okuta/following{/other_user}","gists_url":"https://api.github.com/users/okuta/gists{/gist_id}","starred_url":"https://api.github.com/users/okuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okuta/subscriptions","organizations_url":"https://api.github.com/users/okuta/orgs","repos_url":"https://api.github.com/users/okuta/repos","events_url":"https://api.github.com/users/okuta/events{/privacy}","received_events_url":"https://api.github.com/users/okuta/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":545923268,"url":"https://api.github.com/repos/cupy/cupy/labels/feature","name":"feature","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/cupy/cupy/milestones/28","html_url":"https://github.com/cupy/cupy/milestone/28","labels_url":"https://api.github.com/repos/cupy/cupy/milestones/28/labels","id":3363444,"number":28,"title":"v5.0.0b2","description":"","creator":{"login":"okuta","id":7133388,"avatar_url":"https://avatars1.githubusercontent.com/u/7133388?v=4","gravatar_id":"","url":"https://api.github.com/users/okuta","html_url":"https://github.com/okuta","followers_url":"https://api.github.com/users/okuta/followers","following_url":"https://api.github.com/users/okuta/following{/other_user}","gists_url":"https://api.github.com/users/okuta/gists{/gist_id}","starred_url":"https://api.github.com/users/okuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okuta/subscriptions","organizations_url":"https://api.github.com/users/okuta/orgs","repos_url":"https://api.github.com/users/okuta/repos","events_url":"https://api.github.com/users/okuta/events{/privacy}","received_events_url":"https://api.github.com/users/okuta/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-05-22T05:10:24Z","updated_at":"2018-05-22T14:47:14Z","due_on":"2018-06-21T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cupy/cupy/pulls/1082/commits","review_comments_url":"https://api.github.com/repos/cupy/cupy/pulls/1082/comments","review_comment_url":"https://api.github.com/repos/cupy/cupy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cupy/cupy/issues/1082/comments","statuses_url":"https://api.github.com/repos/cupy/cupy/statuses/3029e1026cd5ce92509ed8dc040648d9e4c47a42","head":{"label":"mitmul:support-dlpack","ref":"support-dlpack","sha":"3029e1026cd5ce92509ed8dc040648d9e4c47a42","user":{"login":"mitmul","id":666535,"avatar_url":"https://avatars0.githubusercontent.com/u/666535?v=4","gravatar_id":"","url":"https://api.github.com/users/mitmul","html_url":"https://github.com/mitmul","followers_url":"https://api.github.com/users/mitmul/followers","following_url":"https://api.github.com/users/mitmul/following{/other_user}","gists_url":"https://api.github.com/users/mitmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmul/subscriptions","organizations_url":"https://api.github.com/users/mitmul/orgs","repos_url":"https://api.github.com/users/mitmul/repos","events_url":"https://api.github.com/users/mitmul/events{/privacy}","received_events_url":"https://api.github.com/users/mitmul/received_events","type":"User","site_admin":false},"repo":{"id":115445706,"name":"cupy","full_name":"mitmul/cupy","owner":{"login":"mitmul","id":666535,"avatar_url":"https://avatars0.githubusercontent.com/u/666535?v=4","gravatar_id":"","url":"https://api.github.com/users/mitmul","html_url":"https://github.com/mitmul","followers_url":"https://api.github.com/users/mitmul/followers","following_url":"https://api.github.com/users/mitmul/following{/other_user}","gists_url":"https://api.github.com/users/mitmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmul/subscriptions","organizations_url":"https://api.github.com/users/mitmul/orgs","repos_url":"https://api.github.com/users/mitmul/repos","events_url":"https://api.github.com/users/mitmul/events{/privacy}","received_events_url":"https://api.github.com/users/mitmul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitmul/cupy","description":"NumPy-like API accelerated with CUDA","fork":true,"url":"https://api.github.com/repos/mitmul/cupy","forks_url":"https://api.github.com/repos/mitmul/cupy/forks","keys_url":"https://api.github.com/repos/mitmul/cupy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitmul/cupy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitmul/cupy/teams","hooks_url":"https://api.github.com/repos/mitmul/cupy/hooks","issue_events_url":"https://api.github.com/repos/mitmul/cupy/issues/events{/number}","events_url":"https://api.github.com/repos/mitmul/cupy/events","assignees_url":"https://api.github.com/repos/mitmul/cupy/assignees{/user}","branches_url":"https://api.github.com/repos/mitmul/cupy/branches{/branch}","tags_url":"https://api.github.com/repos/mitmul/cupy/tags","blobs_url":"https://api.github.com/repos/mitmul/cupy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitmul/cupy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitmul/cupy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitmul/cupy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitmul/cupy/statuses/{sha}","languages_url":"https://api.github.com/repos/mitmul/cupy/languages","stargazers_url":"https://api.github.com/repos/mitmul/cupy/stargazers","contributors_url":"https://api.github.com/repos/mitmul/cupy/contributors","subscribers_url":"https://api.github.com/repos/mitmul/cupy/subscribers","subscription_url":"https://api.github.com/repos/mitmul/cupy/subscription","commits_url":"https://api.github.com/repos/mitmul/cupy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitmul/cupy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitmul/cupy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitmul/cupy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitmul/cupy/contents/{+path}","compare_url":"https://api.github.com/repos/mitmul/cupy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitmul/cupy/merges","archive_url":"https://api.github.com/repos/mitmul/cupy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitmul/cupy/downloads","issues_url":"https://api.github.com/repos/mitmul/cupy/issues{/number}","pulls_url":"https://api.github.com/repos/mitmul/cupy/pulls{/number}","milestones_url":"https://api.github.com/repos/mitmul/cupy/milestones{/number}","notifications_url":"https://api.github.com/repos/mitmul/cupy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitmul/cupy/labels{/name}","releases_url":"https://api.github.com/repos/mitmul/cupy/releases{/id}","deployments_url":"https://api.github.com/repos/mitmul/cupy/deployments","created_at":"2017-12-26T18:27:58Z","updated_at":"2017-12-26T18:28:00Z","pushed_at":"2018-05-08T18:36:43Z","git_url":"git://github.com/mitmul/cupy.git","ssh_url":"git@github.com:mitmul/cupy.git","clone_url":"https://github.com/mitmul/cupy.git","svn_url":"https://github.com/mitmul/cupy","homepage":"https://cupy.chainer.org","size":13766,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cupy:master","ref":"master","sha":"4effd29256189f324145c2bdae989a09df86b48d","user":{"login":"cupy","id":23187665,"avatar_url":"https://avatars2.githubusercontent.com/u/23187665?v=4","gravatar_id":"","url":"https://api.github.com/users/cupy","html_url":"https://github.com/cupy","followers_url":"https://api.github.com/users/cupy/followers","following_url":"https://api.github.com/users/cupy/following{/other_user}","gists_url":"https://api.github.com/users/cupy/gists{/gist_id}","starred_url":"https://api.github.com/users/cupy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cupy/subscriptions","organizations_url":"https://api.github.com/users/cupy/orgs","repos_url":"https://api.github.com/users/cupy/repos","events_url":"https://api.github.com/users/cupy/events{/privacy}","received_events_url":"https://api.github.com/users/cupy/received_events","type":"Organization","site_admin":false},"repo":{"id":72523920,"name":"cupy","full_name":"cupy/cupy","owner":{"login":"cupy","id":23187665,"avatar_url":"https://avatars2.githubusercontent.com/u/23187665?v=4","gravatar_id":"","url":"https://api.github.com/users/cupy","html_url":"https://github.com/cupy","followers_url":"https://api.github.com/users/cupy/followers","following_url":"https://api.github.com/users/cupy/following{/other_user}","gists_url":"https://api.github.com/users/cupy/gists{/gist_id}","starred_url":"https://api.github.com/users/cupy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cupy/subscriptions","organizations_url":"https://api.github.com/users/cupy/orgs","repos_url":"https://api.github.com/users/cupy/repos","events_url":"https://api.github.com/users/cupy/events{/privacy}","received_events_url":"https://api.github.com/users/cupy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cupy/cupy","description":"NumPy-like API accelerated with CUDA","fork":false,"url":"https://api.github.com/repos/cupy/cupy","forks_url":"https://api.github.com/repos/cupy/cupy/forks","keys_url":"https://api.github.com/repos/cupy/cupy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cupy/cupy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cupy/cupy/teams","hooks_url":"https://api.github.com/repos/cupy/cupy/hooks","issue_events_url":"https://api.github.com/repos/cupy/cupy/issues/events{/number}","events_url":"https://api.github.com/repos/cupy/cupy/events","assignees_url":"https://api.github.com/repos/cupy/cupy/assignees{/user}","branches_url":"https://api.github.com/repos/cupy/cupy/branches{/branch}","tags_url":"https://api.github.com/repos/cupy/cupy/tags","blobs_url":"https://api.github.com/repos/cupy/cupy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cupy/cupy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cupy/cupy/git/refs{/sha}","trees_url":"https://api.github.com/repos/cupy/cupy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cupy/cupy/statuses/{sha}","languages_url":"https://api.github.com/repos/cupy/cupy/languages","stargazers_url":"https://api.github.com/repos/cupy/cupy/stargazers","contributors_url":"https://api.github.com/repos/cupy/cupy/contributors","subscribers_url":"https://api.github.com/repos/cupy/cupy/subscribers","subscription_url":"https://api.github.com/repos/cupy/cupy/subscription","commits_url":"https://api.github.com/repos/cupy/cupy/commits{/sha}","git_commits_url":"https://api.github.com/repos/cupy/cupy/git/commits{/sha}","comments_url":"https://api.github.com/repos/cupy/cupy/comments{/number}","issue_comment_url":"https://api.github.com/repos/cupy/cupy/issues/comments{/number}","contents_url":"https://api.github.com/repos/cupy/cupy/contents/{+path}","compare_url":"https://api.github.com/repos/cupy/cupy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cupy/cupy/merges","archive_url":"https://api.github.com/repos/cupy/cupy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cupy/cupy/downloads","issues_url":"https://api.github.com/repos/cupy/cupy/issues{/number}","pulls_url":"https://api.github.com/repos/cupy/cupy/pulls{/number}","milestones_url":"https://api.github.com/repos/cupy/cupy/milestones{/number}","notifications_url":"https://api.github.com/repos/cupy/cupy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cupy/cupy/labels{/name}","releases_url":"https://api.github.com/repos/cupy/cupy/releases{/id}","deployments_url":"https://api.github.com/repos/cupy/cupy/deployments","created_at":"2016-11-01T09:54:45Z","updated_at":"2018-05-22T13:56:49Z","pushed_at":"2018-05-22T14:36:39Z","git_url":"git://github.com/cupy/cupy.git","ssh_url":"git@github.com:cupy/cupy.git","clone_url":"https://github.com/cupy/cupy.git","svn_url":"https://github.com/cupy/cupy","homepage":"https://cupy.chainer.org","size":13792,"stargazers_count":1693,"watchers_count":1693,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":174,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":149,"open_issues":174,"watchers":1693,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cupy/cupy/pulls/1082"},"html":{"href":"https://github.com/cupy/cupy/pull/1082"},"issue":{"href":"https://api.github.com/repos/cupy/cupy/issues/1082"},"comments":{"href":"https://api.github.com/repos/cupy/cupy/issues/1082/comments"},"review_comments":{"href":"https://api.github.com/repos/cupy/cupy/pulls/1082/comments"},"review_comment":{"href":"https://api.github.com/repos/cupy/cupy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cupy/cupy/pulls/1082/commits"},"statuses":{"href":"https://api.github.com/repos/cupy/cupy/statuses/3029e1026cd5ce92509ed8dc040648d9e4c47a42"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"okuta"}}