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.129.124]) by sourceware.org (Postfix) with ESMTPS id 7EF543858C52 for ; Fri, 9 Sep 2022 15:37:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EF543858C52 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=1662737833; 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=h04e1U0t5OiOnKj1NNttMT7an5Mf0lDIMJ2dZaJO5xo=; b=Zxp5UsPiBy7Xrp2QhczfzdzI3RuUvFq2QbfYwfiOeMmyy4wwHAr4/IEjFxgvJ1gUl8ypEL MpVmk5qy72tYhDYUNP95TUfAFi0+xxLaW+rE9E/VuUD7He/wOlSUmmD4hLtodukGFQW5X6 AmK9jMb57ZsAmzk+kwsmKXbQHiy6O3Y= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-131-rT2r6AyfMmCWStHnVoikxA-1; Fri, 09 Sep 2022 11:37:11 -0400 X-MC-Unique: rT2r6AyfMmCWStHnVoikxA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C13028082BB; Fri, 9 Sep 2022 15:36:59 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3705040C128A; Fri, 9 Sep 2022 15:36:59 +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 289FauuJ1598522 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 9 Sep 2022 17:36:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 289FatuO1598521; Fri, 9 Sep 2022 17:36:55 +0200 Date: Fri, 9 Sep 2022 17:36:54 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches , Tom de Vries Subject: Re: [Patch][2/3][v2] nvptx: libgomp+mkoffload.cc: Prepare for reverse offload fn lookup Message-ID: Reply-To: Jakub Jelinek References: <40563a1c-49ef-a185-3c01-9f717cd48fc5@codesourcery.com> <8301889b-64f9-8c60-15ca-2fa1fc495791@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <8301889b-64f9-8c60-15ca-2fa1fc495791@codesourcery.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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.5 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 Mon, Aug 29, 2022 at 08:43:26PM +0200, Tobias Burnus wrote: > Slightly revised version, fixing some issues in mkoffload.cc. Otherwise, the same applies: > > On 25.08.22 19:30, Tobias Burnus wrote: > On 25.08.22 16:54, Tobias Burnus wrote: > > The attached patch prepare for reverse-offload device->host > function-address lookup by requesting (if needed) the on-device address. > > > This patch adds the actual implementation for NVPTX. > > Having array[] = {fn1,fn2}; works with nvptx only since sm_35; hence, > if there is a reverse_offload and sm_30 is used, there will be a compile-time > error. Wonder if we instead shouldn't arrange for silent request for no PTX offloading (or one with warning?) if sm_30 and reverse offload is needed. Error might be too harsh, the program can still offload to GCN or host just fine... Otherwise LGTM. Jakub