From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E2ECA385829A for ; Fri, 9 Sep 2022 15:50:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E2ECA385829A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662738604; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=mzuXF3ss0Ywzfy3vAJzgEMfVhqOJe/nA/BvNpPHeGs8=; b=TcDofiyziLeWXVJAl2NMZ5nHvTVUrydY+uHoKMZBnLkDB4eIsZ85yNcKNEWV7HLkqGaiee vjdie0QKFT1yUt8WS0QdDDbg40UGkOzZTsmsl/HAhN0koaGloWm1hHJOzmeTCXjIktMfgL LjN2RtfMRh/4JSNXe5B2Yzqr/sMW+sk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-484-JqcGLQPKNy-XSFK85YkOkw-1; Fri, 09 Sep 2022 11:49:59 -0400 X-MC-Unique: JqcGLQPKNy-XSFK85YkOkw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 60529803520; Fri, 9 Sep 2022 15:49:59 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E925492C3B; Fri, 9 Sep 2022 15:49:58 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 289Fntnu1598569 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 9 Sep 2022 17:49:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 289FnsEm1598568; Fri, 9 Sep 2022 17:49:54 +0200 Date: Fri, 9 Sep 2022 17:49:54 +0200 From: Jakub Jelinek To: Alexander Monakov Cc: Tobias Burnus , gcc-patches Subject: Re: [Patch] libgomp/nvptx: Prepare for reverse-offload callback handling Message-ID: Reply-To: Jakub Jelinek References: <57b3ae5e-8f15-8bea-fa09-39bccbaa2414@codesourcery.com> <1283e0c0-5831-bb81-a370-c8c14b133f76@ispras.ru> MIME-Version: 1.0 In-Reply-To: <1283e0c0-5831-bb81-a370-c8c14b133f76@ispras.ru> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Aug 26, 2022 at 05:56:09PM +0300, Alexander Monakov via Gcc-patches wrote: > > On Fri, 26 Aug 2022, Tobias Burnus wrote: > > > @Tom and Alexander: Better suggestions are welcome for the busy loop in > > libgomp/plugin/plugin-nvptx.c regarding the variable placement and checking > > its value. > > I think to do that without polling you can use PTX 'brkpt' instruction on the > device and CUDA Debugger API on the host (but you'd have to be careful about > interactions with the real debugger). > > How did the standardization process for this feature look like, how did it pass > if it's not efficiently implementable for the major offloading targets? It doesn't have to be implementable on all major offloading targets, it is enough when it can work on some. As one needs to request the reverse offloading through a declarative directive, it is always possible in that case to just pretend devices that don't support it don't exist. But it would be really nice to support it even on PTX. Are there any other implementations of reverse offloading to PTX already? Jakub