From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23832 invoked by alias); 1 Nov 2019 17:15:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23417 invoked by uid 89); 1 Nov 2019 17:15:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_50,SPF_PASS autolearn=ham version=3.3.1 spammy=i386.c, i386c, UD:i386.c, sk:declare X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Nov 2019 17:15:27 +0000 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F2530AC93; Fri, 1 Nov 2019 17:15:18 +0000 (UTC) From: Martin Jambor To: Jakub Jelinek , Richard Biener , Uros Bizjak , Tom de Vries Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool , Richard Earnshaw , Andreas Krebbel Cc: Subject: Re: [RFC PATCH] targetm.omp.device_kind_arch_isa and OpenMP declare variant kind/arch/isa handling In-Reply-To: <20191029171531.GI4650@tucnak> References: <20191029171531.GI4650@tucnak> User-Agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.3 (x86_64-suse-linux-gnu) Date: Fri, 01 Nov 2019 17:15:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00023.txt.bz2 Hi, On Tue, Oct 29 2019, Jakub Jelinek wrote: > Does this approach look reasonable and is it ok with the backend maintainers > listed in To:? Martin listed for HSA, I'm afraid right now not really sure > at which point it would be possible to distinguish hsa guarded targeted code > from host targeted one. Right, since the general approach is to heavily rely on falling back on the host, I don't think you can do much better than what the patch does. Thanks, Martin > CCed some backend maintainers for thoughts on what > would be reasonable values for the target hook on their backends. > > 2019-10-29 Jakub Jelinek > > * configure.ac: Compute and substitute omp_device_properties and > omp_device_property_deps. > * Makefile.in (generated_files): Add omp-device-properties.h. > (omp-general.o): Depend on omp-device-properties.h. > (omp_device_properties): New make variable. > (omp-device-properties.h, s-omp-device-properties-h, > install-omp-device-properties): New goals. > (install): Depend on install-omp-device-properties for accelerators. > * target.def (TARGET_OMP_DEVICE_KIND_ARCH_ISA): New target hook. > * target.h (enum omp_device_kind_arch_isa): New enum. > * doc/tm.texi.in: Add placeholder for TARGET_OMP_DEVICE_KIND_ARCH_ISA > documentation. > * omp-general.c: Include omp-device-properties.h. > (omp_max_simt_vf): Expect OFFLOAD_TARGET_NAMES to be separated by > colon instead of comma. > (omp_offload_device_kind_arch_isa, omp_maybe_offloaded): New > functions. > (omp_context_selector_matches): Implement device set arch/isa > selectors, improve device set kind selector handling. > * config/i386/i386-options.h (ix86_omp_device_kind_arch_isa): Declare. > * config/i386/i386.c (TARGET_SIMD_CLONE_ADJUST, > TARGET_SIMD_CLONE_USABLE): Formatting fix. > (TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to > ix86_omp_device_kind_arch_isa. > * config/i386/i386-options.c (struct ix86_target_opts): Move type > definition from ix86_target_string to file scope. > (isa2_opts, isa_opts): Moved arrays from ix86_target_string function > to file scope. > (ix86_omp_device_kind_arch_isa): New function. > (ix86_target_string): Moved struct ix86_target_opts, isa2_opts and > isa_opts definitions to file scope. > * config/i386/t-intelmic (omp-device-properties): New goal. > * config/nvptx/t-nvptx (omp-device-properties): Likewise. > * config/nvptx/nvptx.c (nvptx_omp_device_kind_arch_isa): New function. > (TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to > nvptx_omp_device_kind_arch_isa. > * configure: Regenerate. > * doc/tm.texi: Regenerate. > testsuite/ > * c-c++-common/gomp/declare-variant-9.c: New test. > * c-c++-common/gomp/declare-variant-10.c: New test. >