From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 09086395A452 for ; Mon, 3 Jun 2024 07:33:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09086395A452 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 09086395A452 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717399997; cv=none; b=SKNlQnTTIifLd0bvWFUW9Eso84k9VM2yKQQz8Vee4hjEjUquhlDnw7toSTCmQe5P6aIgKxhOU4iAqFmX3nCMha5yjA5lQTrij1Wd1FBmwLv7VhAn8JXQhC59pcBmGklWwIdd+UxLVR6/MPP5PJSsZN1a34li9hokHkisn7FzXyo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717399997; c=relaxed/simple; bh=EHnQf7euQhT/arItqC5DaaDk0ygdjYE6Vy9n0DHMBi4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=g95XV+8KTfLB+MRVfP0DljlMYQyzJ8YrPV2rplPOzWZOY1qftxzkAsrD/bv+Smdo04ZigUsJVXq0aLAsEx30wTW1ZXMKmkAfoHrqYpxmClNQOZQJyNnXrF7bLi84Ouz2eXAwwr/JZuHyDDmjPH9/kRaSeE6tX+IGhkmrK1IF05g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-421396e3918so12148285e9.0 for ; Mon, 03 Jun 2024 00:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717399994; x=1718004794; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Q5ZkS8ZN2IN2YCjUNGi2VACW4XwPIlsi2rX68jPaXc8=; b=lEkryqnmf/70JkVFK8SzW1UYzO22NSanBhaM5ZU9ZnoLXgE7fIoOgEfT0GfeACCr14 /0hmVYfTHSiDVzENF1iQj3YLjMBuVBtMtgg2WnyJ7+FiXoZgszruuwKFOhn3UIOUWQBt D5VFzqahak6duDB9vDwuJCDo1E/rK0Sgil3RbkrnhoH2tgQWIadvMM/jNTPq76N7Ltqp oSSoXLUOFbmewrahOVlIcR+WZdLxr5nhEETjmLopo7dq9yqSBg86Ee5M25PfyU5oN49U RG2CWeBBV1UoyaguG92I8JNnnXsb0XoZ9GUdbz3/6mDuHE0vs2zeZ//gRIHFN4Zc/krA YAYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717399994; x=1718004794; h=content-transfer-encoding:in-reply-to:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q5ZkS8ZN2IN2YCjUNGi2VACW4XwPIlsi2rX68jPaXc8=; b=uHt5iOjGjIIO6Ve0pSVhcETbdBWeQQ3z/0bF2oPRbIMNnJgxVOlUsdpt0yncj2vciy a63V3fdJdrHQ49OUoYRRu8kF0NfTTGJJOTRZb7iyLoLb3ILN5Bv6HtuZZy1+nnLzUFZ+ hWhzEr2pVBOsXxW83NDZMBn4dBX0BEcmth6P7/FcVyEZbHIVJyHWlefbDJ9TcWt04Ot7 Zn0ibpBvKtIHlFhIf19CA5rgYmM5A5HdglGDwmGOWOvL/+KA26bWO39s8ALwFuFF3aOB 79Omiefe1eKMrk3ERnMQ0XkShgB6P41AhEMxEDyKV+b3B/Zd58+ty5vUdMumMdFPTzYk yTxA== X-Gm-Message-State: AOJu0YzIAb6wJGM/aUAfgdkAP/Zla/EQ9eRguT6BkeOULAEs8qrDHVQs OeiPGOSPLmvUOVFI+jum3qiVH0cT7KjryxMM3lZdxcixv3H5KpCio7w58CNbnnQr+xbjMqPGzG/ n X-Google-Smtp-Source: AGHT+IHLpac7PYDdu7TsoIoSum0xQpeHXpS1NjZAE/OtRsIZxZ8tyKUS6c7esStbKmZuYnMNboi03Q== X-Received: by 2002:a05:600c:4744:b0:421:2990:7f9b with SMTP id 5b1f17b1804b1-4212e050597mr86309365e9.14.1717399993663; Mon, 03 Jun 2024 00:33:13 -0700 (PDT) Received: from ?IPV6:2001:16b8:3fd6:e700:14bc:9eaf:2af:3dae? ([2001:16b8:3fd6:e700:14bc:9eaf:2af:3dae]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064b030sm7970453f8f.105.2024.06.03.00.33.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jun 2024 00:33:13 -0700 (PDT) Message-ID: <8540a25f-9f9d-4d53-9b17-6ad4839bfb68@baylibre.com> Date: Mon, 3 Jun 2024 09:33:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [nvptx] *ping* - [patch] [gcn][nvptx] Add warning to mkoffload for 32bit host code From: Tobias Burnus To: gcc-patches , Thomas Schwinge , Jakub Jelinek , Tom de Vries References: <575ee46d-748c-4f2c-8f24-1ec71155ec9e@baylibre.com> Content-Language: en-US Cc: 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: Hi Thomas, hi Tom, any comment regarding this patch? https://gcc.gnu.org/pipermail/gcc-patches/2024-April/650007.html Tobias Am 25.04.24 um 12:51 schrieb Tobias Burnus: > 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? > > Tobias >