From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 8EB293858D38 for ; Thu, 25 Apr 2024 15:07:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8EB293858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8EB293858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714057681; cv=none; b=u4bAzEL+1dIL1SWwnNGTbT2W9NZDvlYnsVspiM0L3uskmaociqd6Vf2DfxQCTC4cpFb4SD+xOzv6LGLsgetVqBCv+FJMAOJe+px/VSFK/hPWnqdnCC3htBQQUWbmO4lrVMtDSCtzNgbqcYC4WOGHPC/zUkap+4BqOZ0ZiA5S6Mw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714057681; c=relaxed/simple; bh=z0/qk94r8hTDgSA78Uq5yVjilKXqdJnlJRktFBggNaQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=qlS2uaiSWCz7f7AIpLqHMtZLWBxLxldeGnXZNta4h7RMxt1D4NDkGxUsMlJ+ftsR1EylOan3GyN5SRrUYvm7boIXZmvJt3W7Rc/QGHEpZXLGLmGFN11ysEjox7o2b+fozRGYR8563HBoksCPzvEtmny8zD9xrtQRug27Ahalvf4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-34b64b7728cso878950f8f.0 for ; Thu, 25 Apr 2024 08:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1714057674; x=1714662474; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=fiEzOOHm93/rNPqdUl+ZixchahP4F1yo1//MCmgoXsI=; b=y3PF02Oy/l9AlrHg6blsSDTT9QgUVxpEoAggkJaG/6lTJ/leZnCmBHzPA6QEL2PaHN yXrShnwmCqO7wJzL5wtGkUjxSjykNtbg9gTYfDRz5NlVD3sjtCYy0jdLrlLBt0mT0R+b QK/RMLUJSiBB5nT1LwTPFa/4QoPcCxOrLcwsm0bEUChgLl+6QTvNc2pSxpfNF2rLcc33 nCN8u1xiHGtdUZrMl0RTZ27iOGsp9TVOenfAidsXhjTuucT1IERMIM98Mv1w4v1fEkzu 6yZ7m//1RlfNS0Z0WGLIW6iuci8Q7/s/XOmpk7bfOOt5apdbd2IuU3mCg8nfUpgREAYh DU7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714057674; x=1714662474; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fiEzOOHm93/rNPqdUl+ZixchahP4F1yo1//MCmgoXsI=; b=ud21Ax7xBP5URfNFS8jckgm9VbcL6l4JJfEonLzRrarieme/RKdMstYoFrdTfIG1Dc om6Uf2ywPBt9ZKHB4Fv6oD31BRg0vOHXjYL6kvDLwGRT+Yq4KKIk/ZjE3fHlj2Vme+cN 7ZaM2aK3ruox6fgJaWwCreYS5ozq7JCcYMPER7nCw6Dtz3xsLVjZ9HtbhuJ2Mmy69EZf qUG6e9ujEEcdbHMzghokLCRHTSmHfCz5BDwPQdnd3dqWO+axMrjpOJ6y+sP13+dr4cbt 7Mm5uiCLUm4NgerE5Qywdxhhhl2WdDVbFZWbzCxYfzPvT3ZsbFQeGBkK5t7iYux4TOm+ lUZg== X-Forwarded-Encrypted: i=1; AJvYcCVg9N90ri5uAhIvO2Azhr/Nz7KJKFQdFPUu662BBGcozGmKsvMLxiNfjoloT/E3BGlE/VXid81Nr9tZiiuI2rx9g6st68dMww== X-Gm-Message-State: AOJu0YynjIGT9gQqbF3Ol4rogcuNCliX+tg1T0tD4VMlS8K470Xk/9Fw UrNy0q3obl8TPHdxNdlt0C+AgvFTRtvz06THK8/nT5TjibGoaNmlK0di3hDJ2us= X-Google-Smtp-Source: AGHT+IErM2jSWP/E7bKAbFF3gTbVaeU0sWLaeLnvu2TUua/9j1/QXm7Y0bj3Kc8119YFYdtXMI66/Q== X-Received: by 2002:a05:6000:dc4:b0:349:c5da:f234 with SMTP id dw4-20020a0560000dc400b00349c5daf234mr3802129wrb.24.1714057674143; Thu, 25 Apr 2024 08:07:54 -0700 (PDT) Received: from [192.168.0.118] (hawk-18-b2-v4wan-167765-cust1304.vm26.cable.virginm.net. [82.41.69.25]) by smtp.gmail.com with ESMTPSA id f7-20020adfe907000000b00346cc85c821sm3240431wrm.89.2024.04.25.08.07.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Apr 2024 08:07:53 -0700 (PDT) Message-ID: <33b46e95-20fa-42a0-b426-1fe69146a4e4@baylibre.com> Date: Thu, 25 Apr 2024 16:07:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch] [gcn][nvptx] Add warning to mkoffload for 32bit host code To: Tobias Burnus , gcc-patches , Thomas Schwinge , Jakub Jelinek References: <575ee46d-748c-4f2c-8f24-1ec71155ec9e@baylibre.com> Content-Language: en-GB From: Andrew Stubbs In-Reply-To: <575ee46d-748c-4f2c-8f24-1ec71155ec9e@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 25/04/2024 11:51, Tobias Burnus wrote: > Motivated by a surprise of a colleague that with -m32, > no offload dumps were created; that's because mkoffload > does not process host binaries when the are 32bit (i.e. ilp32). > > Internally, that done as follows: The host compiler passes to > 'mkoffload' the used host ABI, i.e. -foffload-abi=ilp32 or -foffload-abi=lp64 > > That's done via TARGET_OFFLOAD_OPTIONS, which is supported by aarch64, i386, and rs6000. > > While it is sensible (albeit not strictly required) that GCC requires that > the host and device side agree and that only 64bit is implemented for the > device side, it can be confusing that silently no offloading code is generated. > > > Hence, I propose to print a warning in that case - as implemented in the attached patch: > > $ gcc -fopenmp -m32 test.c > nvptx mkoffload: warning: offload code generation skipped: offloading with 32-bit host code is currently not supported > gcn mkoffload: warning: offload code generation skipped: offloading with 32-bit host code is currently not supported > > * * * > > This shouldn't have any effect on offload builds using -m64 > and non-offload builds – while several testcases already have > issues with '-m32' when offloading is enabled or an offloading > device is available. > > To make it not worse, this patch adds some pruning and for > a subset of the failing testcases, I added code to avoids FAILS. > There are some more fails, but those aren't new. > > Comments, remarks, suggestions? > Is the mkoffload.cc part is okay? The mkoffload part looks reasonable to me. I'm not sure if there are other ABIs we might want to warn about, but this is definitely an improvement. Andrew