From dev-return-8320-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Wed Oct 3 22:28:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 428EF18065B for ; Wed, 3 Oct 2018 22:28:10 +0200 (CEST) Received: (qmail 61267 invoked by uid 500); 3 Oct 2018 20:28:09 -0000 Mailing-List: contact dev-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list dev@arrow.apache.org Received: (qmail 61255 invoked by uid 99); 3 Oct 2018 20:28:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2018 20:28:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E7D221A183A for ; Wed, 3 Oct 2018 20:28:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.111 X-Spam-Level: X-Spam-Status: No, score=-0.111 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id q30Iyzr9dUoc for ; Wed, 3 Oct 2018 20:28:06 +0000 (UTC) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BF34D5F358 for ; Wed, 3 Oct 2018 20:28:05 +0000 (UTC) Received: by mail-io1-f44.google.com with SMTP id q4-v6so6133093iob.8 for ; Wed, 03 Oct 2018 13:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+oUGXslRDOMWKVjhSWQfLTHvr4LgdF3ePE9yDKlKDKo=; b=Dutl8t16A99pApbmHsKmKwQ82BNFIzLmfOg9ad7U1WjEcBCISX0d9vGwAv5rfJ5yNx PBq1wKqvmD2Is3wR8+NigkZdF5VLEb21RPwIZDGn3d+TGCPtZcl+1GZtEQDllYCzoayz 3S5wEXLqpQ5vpzBmhgSGvE9Xuw+0I23IZdIjAoJiDDr531wOnzMktlUcf1dTYPkznHFA g36oLt6FJ3XkBx0XS2z0l4wa8+vCD/TmNYzaVexg2MlDAbvT8bhTL8TNdqtDG+ld66lX tPWAzhBxdkXhy9wkB3zckgp6zPwaxoDwh4PQ8ZNmm36zGuARVFD5XwfVmcMylcS1AGH5 g5IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+oUGXslRDOMWKVjhSWQfLTHvr4LgdF3ePE9yDKlKDKo=; b=K7FMbAy92WxY4N1x0rMg2lEeKwCmTM/MAhP5XElpjYTY2uhNJvjWMdoPw57n3ykqs7 iUXli+XUyh7G4jvp0SitcQ4qqqP/zzPNJ6uWf9aq4rW5sLwzS/noUUyy6QNkRYtR7Z9c 1Yrmbpk3Yh+tR7rz3ZkQcRyBQFcAd3QgJJcQKK4k2ozeuUOkEA1Ev9CsPn60oMJ2QWmd z13LFTWtW8xOJjlrU6CmG6BoxnDCs9cwX9CsC120eVwXnSaqsm0aAaTm77+Uby2GZifN b3fGFaU7HM9AL4we43IDiHh/nL543opDGOFfKfkyeWC26hOX0MhFZ3/Y4kOskN4OiO+k 23cg== X-Gm-Message-State: ABuFfoisAkmbWC0m1+jSUUKeTsVkV42b4MqSHOuoTmXlA/ghwf5Qr7WO TSpj6Q8ThSpbJb5tR+pkFB7a/nf6uoYc8LRIP9hTvSl7sm4= X-Google-Smtp-Source: ACcGV63D5U1BsglMq2QT0eDf3qVxkYcQW8/YfucXdY3DvLfrYEpfrDzDYfFqPjyQx/KvEX1ABdHbGblCDzv/3jL+yjw= X-Received: by 2002:a6b:bf04:: with SMTP id p4-v6mr2347437iof.15.1538598484639; Wed, 03 Oct 2018 13:28:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Wes McKinney Date: Wed, 3 Oct 2018 16:27:28 -0400 Message-ID: Subject: Re: pyarrow.cuda and numba.cuda interoperability To: dev@arrow.apache.org Content-Type: text/plain; charset="UTF-8" hi Pearu, You can construct a host buffer using pyarrow.foreign_buffer http://arrow.apache.org/docs/python/generated/pyarrow.foreign_buffer.html#pyarrow.foreign_buffer It would be great to have analogous functionality for CUDA. Last summer I created this JIRA about "attaching" to a CUDA context created by another library, may be related: https://issues.apache.org/jira/browse/ARROW-1423 - Wes On Wed, Oct 3, 2018 at 12:49 PM Pearu Peterson wrote: > > Hi, > > pa.cuda.CudaBuffer provides address and size of a device memory, so one can > construct numba.cuda MemoryPointer from a CudaBuffer instance and hence > there exists a way to pass CudaBuffer instances to numba.cuda jitted > functions. > > The other way, having a device pointer and size (say, from numba.cuda > objects) and then construct a CudaBuffer from it, is not currently possible > within pyarrow. > > Since C++ CudaBuffer has the corresponding constructor already that takes > the address and size (and context) to produce CudaBuffer instance, would it > make sense to support this also in Python level? [I can give the > implementation a try if so] > > Is it possible to construct a pyarrow.Buffer instance from a host pointer > value and size? > > Best regards, > Pearu