From commits-return-12869-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Tue May 5 17:16:16 2020 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id EFBDE180626 for ; Tue, 5 May 2020 19:16:15 +0200 (CEST) Received: (qmail 19500 invoked by uid 500); 5 May 2020 17:16:15 -0000 Mailing-List: contact commits-help@tvm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tvm.apache.org Delivered-To: mailing list commits@tvm.apache.org Received: (qmail 19491 invoked by uid 99); 5 May 2020 17:16:15 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2020 17:16:15 +0000 From: =?utf-8?q?GitBox?= To: commits@tvm.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-tvm=5D_tqchen_commented_on_pull_request_?= =?utf-8?q?=235512=3A_=5BRPC=5D_Call_sync_in_remote_cpu_to_gpu_copies?= Message-ID: <158869897531.26397.2722304772654172602.asfpy@gitbox.apache.org> Date: Tue, 05 May 2020 17:16:15 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: tqchen commented on pull request #5512: URL: https://github.com/apache/incubator-tvm/pull/5512#issuecomment-624189332 @areusch We only do it for CopyFromRemote and CopyToRemote. In both cases, we(user or rpc server) allocate temp meomory from the arena, which will become invalid after the response period. The user do not guarantee these byte arrays stays alive after the call ends. So that is why explicit sync is needed here. For DeviceAPI::CopyDataFromTo, we do not run the sync, since the resources are NDArrays managed by the remote user, and the remote user can choose to call sync after the copy ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org