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 2A98B3858C52 for ; Fri, 9 Sep 2022 15:29:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A98B3858C52 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=1662737390; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z8P7zTFpRJZl6fl/UTlQ1uwZOgcjoWwQdg7XJEoL1/o=; b=MPLRSOg/iEqs3/dVnGTkBTYfxLbquqlbHvhImdYaP7RjQUnJNoEAsYMGVkeg/JRLiD9CwP DWErQyNplDNOo0o/m878/mZ7MN6kWJNSVtvA6iCxkpHndDRmRfYYXkLfCl6DiHj3/wSINe qjT1iaS9Pcq4B2GitybcgRzH4c6DiFY= 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-627-pcPXETOvM5qhNi73mnGnRw-1; Fri, 09 Sep 2022 11:29:47 -0400 X-MC-Unique: pcPXETOvM5qhNi73mnGnRw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63D2F1C05154; Fri, 9 Sep 2022 15:29:47 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F598492C3B; Fri, 9 Sep 2022 15:29:46 +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 289FTipu1598492 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 9 Sep 2022 17:29:44 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 289FThNf1598491; Fri, 9 Sep 2022 17:29:43 +0200 Date: Fri, 9 Sep 2022 17:29:43 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches Subject: Re: [Patch][1/3] libgomp: Prepare for reverse offload fn lookup Message-ID: Reply-To: Jakub Jelinek References: <40563a1c-49ef-a185-3c01-9f717cd48fc5@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <40563a1c-49ef-a185-3c01-9f717cd48fc5@codesourcery.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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,KAM_SHORT,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 Thu, Aug 25, 2022 at 04:54:51PM +0200, Tobias Burnus wrote: > Technically, this patch is stand alone, but conceptually it based on the > submitted but not reviewed patch: > "[Patch] OpenMP: Support reverse offload (middle end part)" > https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598662.html > > With that patch, for reverse offloads ('omp target device(ancestor:1)'), > calls like the following are added: > GOMP_target_ext (-2 /* initial device */, omp_fn.1 > where 'omp_fn.1' on nonhost devices a stub function just required for > looking up the host function pointer via the offload_funcs table. > > The attached patch prepare for reverse-offload device->host > function-address lookup by requesting (if needed) the on-device address. > > OK for mainline? > > Tobias > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 > libgomp: Prepare for reverse offload fn lookup > > Prepare for reverse-offloading function-pointer lookup by passing > a rev_fn_table argument to GOMP_OFFLOAD_load_image. > > The argument will be NULL, unless GOMP_REQUIRES_REVERSE_OFFLOAD is > requested and devices not supported it, are filtered out. > (Up to and including this commit, no non-host device claims such > support and the caller currently always passes NULL.) > > libgomp/ChangeLog: > > * libgomp-plugin.h (GOMP_OFFLOAD_load_image): Add > 'uint64_t **rev_fn_table' argument. > * oacc-host.c (host_load_image): Likewise. > * plugin/plugin-gcn.c (GOMP_OFFLOAD_load_image): Likewise; > currently unused. > * plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Likewise. > * target.c (gomp_load_image_to_device): Update call but pass > NULL for now. > > liboffloadmic/ChangeLog: > > * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_load_image): > Add (unused) uint64_t **rev_fn_table argument. Ok, thanks. Jakub