From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 0DD3A3858404 for ; Thu, 1 Jun 2023 17:53:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0DD3A3858404 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-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-25692ff86cdso844901a91.2 for ; Thu, 01 Jun 2023 10:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685642018; x=1688234018; 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=fGoqGJycLVFgr+9KVcsNLsrGq+DW0iIr1Ugh2vMr32s=; b=oNsC2yIw2P9Po3B5vkJPfKz15OGhoKzv5LfQGjTQ5k/6MS4u+57z/RvIHUaTDj1g2q d2ayvyDUnHMZ4ILA8zJtC8165pTqjuvglBDqdrFAoHBr0jwtKRNqeO7Ujan1UIXgzgIJ PULUxcjOXuR4xzeN8K+K5tXWUUGaqO5RjYKTcq2hV67AiOHrsHRGZe8YQXbctnG8ZHF/ CCRih/4FTS6EzhyW19X+xWe9s062rY+gJMKaKzJ34LS3xK/VURJWvPB4BdNjSMZ3kx5z Y0rXxwuLy+NWjwkur/jJVR2IxxbHBxjcMQMmMBQsjhFruiTTc9H5i27JQ5jyu92i4TbU x9Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685642018; x=1688234018; 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=fGoqGJycLVFgr+9KVcsNLsrGq+DW0iIr1Ugh2vMr32s=; b=kTJzmq6WQ7wNGHdC1w/cJ8r/T3XqaC49B2lbGrC/Dark2qhDURrxXTI2hMmpML9ks+ 2HrJwCq3sN91FHEZQwS8iguG/co/gw/73bgrsf2R0sQQiXfhNcnVeM4tbi48EgL+YGXL 4lpyZPvKEyUrR5beCP3Ovqf4vtwwmi9onZEZpWqbgiZF0OSdrq4l3LLwedRJwnkiDw6g qy0NKfb60CkCMB8TffnC2Jd78LsbMY6mk+3uQ9vhEEgaAWx3oFSIVBS5BDEOObQHBK1z uFoQgw1ic+Awi6sZci0NCB0NRzt5SuCWItVfFcuhesBslSA4g0BFGrDKVIxZDSjEed18 ybCw== X-Gm-Message-State: AC+VfDxqPtisOnDKKagtsnReKNm0o0IQrK1ihxnglCf1BUNjK/ybXwC5 MQ9vWrZmaYb/BVFPg4qFugo= X-Google-Smtp-Source: ACHHUZ5tjwIr5c/0XN5kBArULwI1gqRvjG+ZkNfCvwO0leXxNKyk3XtV63QVzVRh9XPl6+FYxiZSEg== X-Received: by 2002:a17:90b:f0a:b0:255:afdd:2e7 with SMTP id br10-20020a17090b0f0a00b00255afdd02e7mr149314pjb.7.1685642017834; Thu, 01 Jun 2023 10:53:37 -0700 (PDT) Received: from ?IPV6:2601:681:8d00:265::f0a? ([2601:681:8d00:265::f0a]) by smtp.gmail.com with ESMTPSA id z14-20020a17090a1fce00b00250334d97dasm1757468pjz.31.2023.06.01.10.53.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Jun 2023 10:53:37 -0700 (PDT) Message-ID: <587e1260-fdeb-ea02-dae4-26fbcb3a37e4@gmail.com> Date: Thu, 1 Jun 2023 11:53:36 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: FW: [RFC] RISC-V: Support risc-v bfloat16 This patch support bfloat16 in riscv like x86_64 and arm. Content-Language: en-US To: Palmer Dabbelt Cc: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org, jinma@linux.alibaba.com, Kito.cheng@sifive.com References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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,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/1/23 10:56, Palmer Dabbelt wrote: > On Thu, 01 Jun 2023 09:48:47 PDT (-0700), jeffreyalaw@gmail.com wrote: >> >> >> On 6/1/23 01:01, juzhe.zhong@rivai.ai wrote: >>> I plan to implement BF16 vector in GCC but still waiting for ISA >>> ratified since GCC policy doesn't allow un-ratified ISA. >> Right.  So those specs need to move along further before we can start >> integrating code. >> >>> >>> Currently, we are working on INT8,INT16,INT32,INT64,FP16,FP32,FP64 >>> auto-vectorizaiton. >>> It should very simple BF16 in current vector framework in GCC. >> In prior architectures I've worked on the bulk of BF16 work was just >> adding additional entries to existing iterators.  So I agree, it should >> be very simple :-) > > We should also have someone who's a bit more plugged in to floating > point check to make sure the RISC-V bfloat16 semantics match IEEE.  I > don't see any issues, but I'm not really a FP person so I'm not sure. > There were certainly a lot of subtlies for the other FP bits, so even if > the implementation just plumbs straight through IMO it's worth checking. > > We have one FP person at Rivos, I can try and rope him in if you want? > Happy to have someone else do it, though, as he's usually pretty busy ;) I don't really have an FP expert here. I can't honestly pretend to be one myself. jeff