From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id DAA473858D37 for ; Wed, 28 Jun 2023 18:37:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DAA473858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1b80b3431d2so1616585ad.1 for ; Wed, 28 Jun 2023 11:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687977456; x=1690569456; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SECd91ifP61X4kII6g2eB33B8nNI450MFf0eFiIeOvY=; b=lAaAn62vUC0gOK2mX0qwBaSU7KUmt4vL5nsDekI+LCn0gbw4oJg15DW5gjf+R/Ujmi qCdSPGgb+8fYXQSZUm8OThtX+dVBbdO3WVfVG412v9tv1ja6KaPSPD2K2Qu8Vl/CAiys c/hX6avRQSCEgaicUEChMbdCmiQpCBRcXqF/ubfkSt880iqfiz6tIfWOKMoebv9LkInQ naEStUbw2LgWphShkQyCPtBKihOvCyW3CHbSNczVGvhvFcxEis9ROi4yH2tq+N54GRNV rRWa28Q3iX6+Y0/jRmsuD0i65f9jUlxT7RPDKZxOKMLO51dx9lSTsFNCPn7PSCLvB8Vg rYIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687977456; x=1690569456; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SECd91ifP61X4kII6g2eB33B8nNI450MFf0eFiIeOvY=; b=MyIabqqToNy5apJnAQVCluKX10P20p4d8otJUdCuSpvsXL2XBrrIA9t8K7y0QEfwp/ QOQdYLjCnyQiViZHqirdm1snim0b1VoNV4qsfBW82Sh9ccoFw4iM6SWSXtZMTxrud+wI b3Jvndcf4Ufa2bWFAKkEwmobLvR8APvf14RXlxbPGWnaVrzR5MYUiDPrW0d17LCZTAST zOQcdvHcENTc62HjoeFinrC2wT+z55zum04bUMopCMuPdcBf2uHW72dN0PL8i+aOUZCv eER5JRnRqkkQvuMx2NFHWJVMWJtV/N8lunKqYcCqRz3qtpayaTXJjQPhiq4R8BZWYi3G 4J3w== X-Gm-Message-State: AC+VfDwGWRgKLgkN70hnU8K8mupsJZKHC533/c7j6yoEHnfbYFUViRpl VDnQ1BiYGcI0445OCFzaEAg= X-Google-Smtp-Source: ACHHUZ5IZqKmI/L7kzCLb1u93wwaI96EBPXZjeytJqACvD8wA8ZL9Qab9CDA7FeFJPQemeoNKYC29w== X-Received: by 2002:a17:902:e848:b0:1b2:436b:931c with SMTP id t8-20020a170902e84800b001b2436b931cmr10686006plg.43.1687977455691; Wed, 28 Jun 2023 11:37:35 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id je4-20020a170903264400b001ab12ccc2a7sm8020313plb.98.2023.06.28.11.37.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jun 2023 11:37:34 -0700 (PDT) Message-ID: <1d18c27d-e9be-21c1-7011-b9e533f6c1a5@gmail.com> Date: Wed, 28 Jun 2023 12:37:33 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] RISC-V: Fix out of range memory access of machine mode table Content-Language: en-US To: "Li, Pan2" , Jakub Jelinek Cc: "gcc-patches@gcc.gnu.org" , "juzhe.zhong@rivai.ai" , "rdapp.gcc@gmail.com" , "Wang, Yanzhang" , "kito.cheng@gmail.com" , "rguenther@suse.de" References: <20230619080710.1536456-1-pan2.li@intel.com> <20230619090548.1574008-1-pan2.li@intel.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,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: On 6/21/23 18:19, Li, Pan2 wrote: > Hi there, > > I try to verify the offloading following below doc. > > https://gcc.gnu.org/wiki/Offloading#How_to_build_an_offloading-enabled_GCC > > with some steps: > > 1. Build nvptx-tools. > 2. Symbol link nvptx-newlib to gcc source code. > 3. Build the Nividia PTX accel compiler. > 4. Build the host compiler with nvptx as offload target, but I don't have the GPU, then drop the --with-cuda-driver=xxx option. > 5. Run command for building, aka ./nvptx-tools/usr/local/bin/gcc -O0 -fopenmp test.c -o test.elf. > > The building complete successfully, but looks I cannot run it without GPU, and I am not very sure this is good enough for validation or not. If you don't have a suitable GPU for offloading, you could instead just compare the offloaded binary before/after your change. I would expect them to be 100% identical. If we take that route for verification, I think the question turns into how to do that for the testsuite. ie, I think Jakub wants to verify that check-target-libgomp still passes when offloading is enabled. I don't think there's an easy way to capture the resulting binaries for comparison purposes. But that's what I'd suggest given the lack of a suitable GPU for testing. So you might need to hack up the libgomp testsuite's .exp files to capture the binaries. Before going to those extremes, I would suggest verifying that you do in fact get identical binaries before/after your change on a simple offloading test. jeff