From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 23F913858C50 for ; Thu, 27 Oct 2022 09:11:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 23F913858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 108771FD9E; Thu, 27 Oct 2022 09:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666861887; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eFhBQGrut6SW22Vl8QZo/8ONlbxBcRoPK1QL30wfB58=; b=q9CBLexGXvmy0nFVtUr5W8Y/kkd8BIaA73/AsnprhtTThGM99Z56liptN2tYYhFNvvtjvF FxEczYdWn87XFLMtYUHKObCawh3TR9KzwKSSMStvg8RHCrCS1CDptmGTRQVzCLT/H6W/zy +Gjn06FgdGWp+WvJ4IPLkTw506jCNn0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666861887; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eFhBQGrut6SW22Vl8QZo/8ONlbxBcRoPK1QL30wfB58=; b=OH0ukv+BuZp56HQBtrP9dvapgMLpHQVus8Fl1ef6ku+9OKG8AUFYrwKKOo14YiOdwJcuPy wBTfuXZ4NNBxmbCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CE1A013357; Thu, 27 Oct 2022 09:11:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZkhTMT5LWmMVVwAAMHmgww (envelope-from ); Thu, 27 Oct 2022 09:11:26 +0000 Message-ID: Date: Thu, 27 Oct 2022 11:11:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] [x86_64] Zhaoxin lujiazui enablement Content-Language: en-US To: Mayshao-oc , Uros Bizjak Cc: "Silvia Zhao(BJ-RD)" , TimHu-oc , "Cobe Chen(BJ-RD)" , "gcc-patches@gcc.gnu.org" , "Hawk Wang(BJ-RD)" , "Louis Qi(BJ-RD)" , Jan Hubicka References: <20220325020815.16674-1-MayShao-oc@zhaoxin.com> <9263704e-b2f1-f21d-f888-a884547a0cf5@suse.cz> <28ad8b4bd1ab4c7997c3f6d6b694895f@zhaoxin.com> <76a79f24-dcff-a692-f782-956305090ba5@suse.cz> <71e45f1a072a400c8d6a92ead303bab4@zhaoxin.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <71e45f1a072a400c8d6a92ead303bab4@zhaoxin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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 10/27/22 11:09, Mayshao-oc wrote: > > >>> >>> Hi Martin: >>>     Thanks for your patch,  I comment the questions below. > >>Hi. > >>:) > >>> >>>> Hello. >>> >>>> I noticed this patch set which is kind of related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107364 . >>> >>>> And I have a couple of questions: >>> >>>>1) I noticed you drop AVX and F16C features for the newly added "lujiazui". Why do you need it? >>>>  I would expect these features would be properly detected by cpuid? >>> >>> Yes, these features could be detected by cpuid, and in respect of functionality, these features are ok, but in respect of performance, these features need further improvement, so we decide to drop it now, and add these features back when performance meet our expectation. > >> I see. So theoretically you can increase costs of the corresponding insns and that could be dropped now? >> But I'm not a costing expert. Hi. One note: please try to send plain-text emails to GCC's mailing lists and not HTML version. Thanks! > > I am new to gcc, and have lots of things to learn. About LTO and PGO, I have read some knowledge you and hubicka shared, and it helps me a lot, As a performance issue, it is a good idea to use cost model to solve, and disable avx entirely seems overkill. But cost model need to set the appropriate value of the cost, it's challenging to specify the number and more challenging to justify why we set that number. Our current approach have a pitfall to accommodate AVX intrinsic functions(eg: __mm256_loadu_pd), we could use -mavx to specify this explictly to overcome this. Sure, makes sense. Martin > >>> >>>> 2) If you really need it, can you please test for me the attached patch? It should come up >>>>  with a new function. >>> >>> I have tested the patch, It's ok. > >> Good, I'm going to install it. > >>> >>>> 3) Have question about: >>> >>>> else if (vendor == signature_CENTAUR_ebx && family < 0x07) >>>>    cpu_model->__cpu_vendor = VENDOR_CENTAUR; >>>> else if (vendor == signature_SHANGHAI_ebx >>>>               || vendor == signature_CENTAUR_ebx) >>> >>>> Are there any signature_CENTAUR_ebx models with family == 0x7 ? >>>> Similarly, are there any signature_SHANGHAI_ebx modes with family < 0x7 ? >>> >>> Yes, both cases exist in our products. > >> Good. Then we miss a CPU features detection for (vendor == signature_CENTAUR_ebx && family < 0x07) >> aka https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107364 . But it's not worth it as it's a legacy hardware, >> right? > > Yes, for legacy hardware, we need to keep it work correctly, but in respect of performance, we don't spend a lot of time to tune. > >> Cheers, >> Martin > >>> >>>> Thanks, >>> Martin >>> >>> BR >>> Mayshao >