* [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS @ 2022-06-23 7:14 Cui,Lili 2022-06-23 7:29 ` Jan Beulich 0 siblings, 1 reply; 8+ messages in thread From: Cui,Lili @ 2022-06-23 7:14 UTC (permalink / raw) To: hjl.tools, jbeulich; +Cc: binutils This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. Make check-gas is ok. Ok for master? Thanks, Lili. Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" opcodes/ * i386-gen.c (cpu_flag_init): Change cpu_flags of CPU_ANY_AVX512BW_FLAGS. --- opcodes/i386-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index d18a7d2754..5dc224efdb 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = { "CPU_ANY_AVX512DQ_FLAGS", "CpuAVX512DQ" }, { "CPU_ANY_AVX512BW_FLAGS", - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, + "CpuAVX512BW|CpuAVX512_FP16" }, { "CPU_ANY_AVX512VL_FLAGS", "CpuAVX512VL" }, { "CPU_ANY_AVX512IFMA_FLAGS", -- 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 7:14 [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS Cui,Lili @ 2022-06-23 7:29 ` Jan Beulich 2022-06-23 8:08 ` Cui, Lili 0 siblings, 1 reply; 8+ messages in thread From: Jan Beulich @ 2022-06-23 7:29 UTC (permalink / raw) To: Cui,Lili; +Cc: binutils, hjl.tools On 23.06.2022 09:14, Cui,Lili wrote: > This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > Make check-gas is ok. > Ok for master? > > Thanks, > Lili. > > Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" You don't say what's wrong with what there is right now. I for one think what we have is correct: If one disables BW, _all_ its dependents should be disabled as well, which transitively means all dependents of FP16. Jan > opcodes/ > > * i386-gen.c (cpu_flag_init): Change cpu_flags of > CPU_ANY_AVX512BW_FLAGS. > --- > opcodes/i386-gen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c > index d18a7d2754..5dc224efdb 100644 > --- a/opcodes/i386-gen.c > +++ b/opcodes/i386-gen.c > @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > { "CPU_ANY_AVX512DQ_FLAGS", > "CpuAVX512DQ" }, > { "CPU_ANY_AVX512BW_FLAGS", > - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > + "CpuAVX512BW|CpuAVX512_FP16" }, > { "CPU_ANY_AVX512VL_FLAGS", > "CpuAVX512VL" }, > { "CPU_ANY_AVX512IFMA_FLAGS", ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 7:29 ` Jan Beulich @ 2022-06-23 8:08 ` Cui, Lili 2022-06-23 16:04 ` H.J. Lu 0 siblings, 1 reply; 8+ messages in thread From: Cui, Lili @ 2022-06-23 8:08 UTC (permalink / raw) To: Beulich, Jan; +Cc: binutils, hjl.tools > -----Original Message----- > From: Jan Beulich <jbeulich@suse.com> > Sent: Thursday, June 23, 2022 3:30 PM > To: Cui, Lili <lili.cui@intel.com> > Cc: binutils@sourceware.org; hjl.tools@gmail.com > Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS > > On 23.06.2022 09:14, Cui,Lili wrote: > > This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > > Make check-gas is ok. > > Ok for master? > > > > Thanks, > > Lili. > > > > Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" > > You don't say what's wrong with what there is right now. I for one think what > we have is correct: If one disables BW, _all_ its dependents should be > disabled as well, which transitively means all dependents of FP16. > Hi Jan, Agree with that " If one disables BW, _all_ its dependents should be disabled as well ". I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* . { "CPU_ANY_AVX512F_FLAGS", "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" }, Regards, Lili. > Jan > > > opcodes/ > > > > * i386-gen.c (cpu_flag_init): Change cpu_flags of > > CPU_ANY_AVX512BW_FLAGS. > > --- > > opcodes/i386-gen.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index > > d18a7d2754..5dc224efdb 100644 > > --- a/opcodes/i386-gen.c > > +++ b/opcodes/i386-gen.c > > @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > > { "CPU_ANY_AVX512DQ_FLAGS", > > "CpuAVX512DQ" }, > > { "CPU_ANY_AVX512BW_FLAGS", > > - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > > + "CpuAVX512BW|CpuAVX512_FP16" }, > > { "CPU_ANY_AVX512VL_FLAGS", > > "CpuAVX512VL" }, > > { "CPU_ANY_AVX512IFMA_FLAGS", ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 8:08 ` Cui, Lili @ 2022-06-23 16:04 ` H.J. Lu 2022-06-23 16:07 ` Jan Beulich 0 siblings, 1 reply; 8+ messages in thread From: H.J. Lu @ 2022-06-23 16:04 UTC (permalink / raw) To: Cui, Lili; +Cc: Beulich, Jan, binutils On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote: > > > > > -----Original Message----- > > From: Jan Beulich <jbeulich@suse.com> > > Sent: Thursday, June 23, 2022 3:30 PM > > To: Cui, Lili <lili.cui@intel.com> > > Cc: binutils@sourceware.org; hjl.tools@gmail.com > > Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS > > > > On 23.06.2022 09:14, Cui,Lili wrote: > > > This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > > > Make check-gas is ok. > > > Ok for master? > > > > > > Thanks, > > > Lili. > > > > > > Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" > > > > You don't say what's wrong with what there is right now. I for one think what > > we have is correct: If one disables BW, _all_ its dependents should be > > disabled as well, which transitively means all dependents of FP16. > > > Hi Jan, > Agree with that " If one disables BW, _all_ its dependents should be disabled as well ". > I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* . > > { "CPU_ANY_AVX512F_FLAGS", > "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" }, > > Regards, > Lili. > > > Jan > > > > > opcodes/ > > > > > > * i386-gen.c (cpu_flag_init): Change cpu_flags of > > > CPU_ANY_AVX512BW_FLAGS. > > > --- > > > opcodes/i386-gen.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index > > > d18a7d2754..5dc224efdb 100644 > > > --- a/opcodes/i386-gen.c > > > +++ b/opcodes/i386-gen.c > > > @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > > > { "CPU_ANY_AVX512DQ_FLAGS", > > > "CpuAVX512DQ" }, > > > { "CPU_ANY_AVX512BW_FLAGS", > > > - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > > > + "CpuAVX512BW|CpuAVX512_FP16" }, > > > { "CPU_ANY_AVX512VL_FLAGS", > > > "CpuAVX512VL" }, > > > { "CPU_ANY_AVX512IFMA_FLAGS", > Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16, this change is nop. On the other hand, CPU_ANY shouldn't be used to define another CPU_ANY. Please also replace CPU_ANY_AVX512BW_FLAGS with CpuAVX512BW|CpuAVX512_FP16 for CPU_ANY_AVX512F_FLAGS. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 16:04 ` H.J. Lu @ 2022-06-23 16:07 ` Jan Beulich 2022-06-23 16:31 ` H.J. Lu 0 siblings, 1 reply; 8+ messages in thread From: Jan Beulich @ 2022-06-23 16:07 UTC (permalink / raw) To: H.J. Lu; +Cc: binutils, Cui, Lili On 23.06.2022 18:04, H.J. Lu wrote: > On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote: >> >> >> >>> -----Original Message----- >>> From: Jan Beulich <jbeulich@suse.com> >>> Sent: Thursday, June 23, 2022 3:30 PM >>> To: Cui, Lili <lili.cui@intel.com> >>> Cc: binutils@sourceware.org; hjl.tools@gmail.com >>> Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS >>> >>> On 23.06.2022 09:14, Cui,Lili wrote: >>>> This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. >>>> Make check-gas is ok. >>>> Ok for master? >>>> >>>> Thanks, >>>> Lili. >>>> >>>> Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" >>> >>> You don't say what's wrong with what there is right now. I for one think what >>> we have is correct: If one disables BW, _all_ its dependents should be >>> disabled as well, which transitively means all dependents of FP16. >>> >> Hi Jan, >> Agree with that " If one disables BW, _all_ its dependents should be disabled as well ". >> I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* . >> >> { "CPU_ANY_AVX512F_FLAGS", >> "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" }, >> >> Regards, >> Lili. >> >>> Jan >>> >>>> opcodes/ >>>> >>>> * i386-gen.c (cpu_flag_init): Change cpu_flags of >>>> CPU_ANY_AVX512BW_FLAGS. >>>> --- >>>> opcodes/i386-gen.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index >>>> d18a7d2754..5dc224efdb 100644 >>>> --- a/opcodes/i386-gen.c >>>> +++ b/opcodes/i386-gen.c >>>> @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = >>>> { "CPU_ANY_AVX512DQ_FLAGS", >>>> "CpuAVX512DQ" }, >>>> { "CPU_ANY_AVX512BW_FLAGS", >>>> - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, >>>> + "CpuAVX512BW|CpuAVX512_FP16" }, >>>> { "CPU_ANY_AVX512VL_FLAGS", >>>> "CpuAVX512VL" }, >>>> { "CPU_ANY_AVX512IFMA_FLAGS", >> > > Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16, > this change is nop. On the other hand, CPU_ANY shouldn't be used to define > another CPU_ANY. Why? Imo that's exactly how it should be, as long as the purpose of CPU_ANY_* is the use for processing of negative .arch directives. Jan ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 16:07 ` Jan Beulich @ 2022-06-23 16:31 ` H.J. Lu 2022-06-24 1:56 ` H.J. Lu 0 siblings, 1 reply; 8+ messages in thread From: H.J. Lu @ 2022-06-23 16:31 UTC (permalink / raw) To: Jan Beulich; +Cc: binutils, Cui, Lili On Thu, Jun 23, 2022 at 9:08 AM Jan Beulich <jbeulich@suse.com> wrote: > > On 23.06.2022 18:04, H.J. Lu wrote: > > On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote: > >> > >> > >> > >>> -----Original Message----- > >>> From: Jan Beulich <jbeulich@suse.com> > >>> Sent: Thursday, June 23, 2022 3:30 PM > >>> To: Cui, Lili <lili.cui@intel.com> > >>> Cc: binutils@sourceware.org; hjl.tools@gmail.com > >>> Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS > >>> > >>> On 23.06.2022 09:14, Cui,Lili wrote: > >>>> This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > >>>> Make check-gas is ok. > >>>> Ok for master? > >>>> > >>>> Thanks, > >>>> Lili. > >>>> > >>>> Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" > >>> > >>> You don't say what's wrong with what there is right now. I for one think what > >>> we have is correct: If one disables BW, _all_ its dependents should be > >>> disabled as well, which transitively means all dependents of FP16. > >>> > >> Hi Jan, > >> Agree with that " If one disables BW, _all_ its dependents should be disabled as well ". > >> I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* . > >> > >> { "CPU_ANY_AVX512F_FLAGS", > >> "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" }, > >> > >> Regards, > >> Lili. > >> > >>> Jan > >>> > >>>> opcodes/ > >>>> > >>>> * i386-gen.c (cpu_flag_init): Change cpu_flags of > >>>> CPU_ANY_AVX512BW_FLAGS. > >>>> --- > >>>> opcodes/i386-gen.c | 2 +- > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>> > >>>> diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index > >>>> d18a7d2754..5dc224efdb 100644 > >>>> --- a/opcodes/i386-gen.c > >>>> +++ b/opcodes/i386-gen.c > >>>> @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > >>>> { "CPU_ANY_AVX512DQ_FLAGS", > >>>> "CpuAVX512DQ" }, > >>>> { "CPU_ANY_AVX512BW_FLAGS", > >>>> - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > >>>> + "CpuAVX512BW|CpuAVX512_FP16" }, > >>>> { "CPU_ANY_AVX512VL_FLAGS", > >>>> "CpuAVX512VL" }, > >>>> { "CPU_ANY_AVX512IFMA_FLAGS", > >> > > > > Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16, > > this change is nop. On the other hand, CPU_ANY shouldn't be used to define > > another CPU_ANY. > > Why? Imo that's exactly how it should be, as long as the purpose of > CPU_ANY_* is the use for processing of negative .arch directives. > Assuming AVX512_FP16 also requires BMI2, when AVX512F is disabled, AVX512_FP16 should be disabled, but not BMI2. -- H.J. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-23 16:31 ` H.J. Lu @ 2022-06-24 1:56 ` H.J. Lu 2022-06-24 2:03 ` Cui, Lili 0 siblings, 1 reply; 8+ messages in thread From: H.J. Lu @ 2022-06-24 1:56 UTC (permalink / raw) To: Jan Beulich; +Cc: binutils, Cui, Lili On Thu, Jun 23, 2022 at 9:31 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Thu, Jun 23, 2022 at 9:08 AM Jan Beulich <jbeulich@suse.com> wrote: > > > > On 23.06.2022 18:04, H.J. Lu wrote: > > > On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote: > > >> > > >> > > >> > > >>> -----Original Message----- > > >>> From: Jan Beulich <jbeulich@suse.com> > > >>> Sent: Thursday, June 23, 2022 3:30 PM > > >>> To: Cui, Lili <lili.cui@intel.com> > > >>> Cc: binutils@sourceware.org; hjl.tools@gmail.com > > >>> Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS > > >>> > > >>> On 23.06.2022 09:14, Cui,Lili wrote: > > >>>> This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > > >>>> Make check-gas is ok. > > >>>> Ok for master? > > >>>> > > >>>> Thanks, > > >>>> Lili. > > >>>> > > >>>> Change it from "CPU_ANY_AVX512_FP16_FLAGS" to "CpuAVX512_FP16" > > >>> > > >>> You don't say what's wrong with what there is right now. I for one think what > > >>> we have is correct: If one disables BW, _all_ its dependents should be > > >>> disabled as well, which transitively means all dependents of FP16. > > >>> > > >> Hi Jan, > > >> Agree with that " If one disables BW, _all_ its dependents should be disabled as well ". > > >> I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" to be the only one that uses cpu_flags instead of CPU_ANY* . > > >> > > >> { "CPU_ANY_AVX512F_FLAGS", > > >> "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CPU_ANY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INTERSECT" }, > > >> > > >> Regards, > > >> Lili. > > >> > > >>> Jan > > >>> > > >>>> opcodes/ > > >>>> > > >>>> * i386-gen.c (cpu_flag_init): Change cpu_flags of > > >>>> CPU_ANY_AVX512BW_FLAGS. > > >>>> --- > > >>>> opcodes/i386-gen.c | 2 +- > > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > > >>>> > > >>>> diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index > > >>>> d18a7d2754..5dc224efdb 100644 > > >>>> --- a/opcodes/i386-gen.c > > >>>> +++ b/opcodes/i386-gen.c > > >>>> @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > > >>>> { "CPU_ANY_AVX512DQ_FLAGS", > > >>>> "CpuAVX512DQ" }, > > >>>> { "CPU_ANY_AVX512BW_FLAGS", > > >>>> - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > > >>>> + "CpuAVX512BW|CpuAVX512_FP16" }, > > >>>> { "CPU_ANY_AVX512VL_FLAGS", > > >>>> "CpuAVX512VL" }, > > >>>> { "CPU_ANY_AVX512IFMA_FLAGS", > > >> > > > > > > Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16, > > > this change is nop. On the other hand, CPU_ANY shouldn't be used to define > > > another CPU_ANY. > > > > Why? Imo that's exactly how it should be, as long as the purpose of > > CPU_ANY_* is the use for processing of negative .arch directives. > > > > Assuming AVX512_FP16 also requires BMI2, when AVX512F is disabled, > AVX512_FP16 should be disabled, but not BMI2. > I was wrong. The current code isn't wrong since { "CPU_ANY_AVX512BW_FLAGS", "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, indicates that disabling AVX512BW will also disable AVX512BW + AVX512F16 + any ISAs which depend on AVX512FP16. If there is another ISA which depends on AVX512FP16, we don't need to change CPU_ANY_AVX512BW_FLAGS. -- H.J. ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS 2022-06-24 1:56 ` H.J. Lu @ 2022-06-24 2:03 ` Cui, Lili 0 siblings, 0 replies; 8+ messages in thread From: Cui, Lili @ 2022-06-24 2:03 UTC (permalink / raw) To: H.J. Lu, Beulich, Jan; +Cc: binutils > -----Original Message----- > From: H.J. Lu <hjl.tools@gmail.com> > Sent: Friday, June 24, 2022 9:56 AM > To: Beulich, Jan <JBeulich@suse.com> > Cc: binutils@sourceware.org; Cui, Lili <lili.cui@intel.com> > Subject: Re: [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS > > On Thu, Jun 23, 2022 at 9:31 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > On Thu, Jun 23, 2022 at 9:08 AM Jan Beulich <jbeulich@suse.com> wrote: > > > > > > On 23.06.2022 18:04, H.J. Lu wrote: > > > > On Thu, Jun 23, 2022 at 1:08 AM Cui, Lili <lili.cui@intel.com> wrote: > > > >> > > > >> > > > >> > > > >>> -----Original Message----- > > > >>> From: Jan Beulich <jbeulich@suse.com> > > > >>> Sent: Thursday, June 23, 2022 3:30 PM > > > >>> To: Cui, Lili <lili.cui@intel.com> > > > >>> Cc: binutils@sourceware.org; hjl.tools@gmail.com > > > >>> Subject: Re: [PATCH] Correct cpu_flags for > > > >>> CPU_ANY_AVX512BW_FLAGS > > > >>> > > > >>> On 23.06.2022 09:14, Cui,Lili wrote: > > > >>>> This patch is to correct cpu_flags for CPU_ANY_AVX512BW_FLAGS. > > > >>>> Make check-gas is ok. > > > >>>> Ok for master? > > > >>>> > > > >>>> Thanks, > > > >>>> Lili. > > > >>>> > > > >>>> Change it from "CPU_ANY_AVX512_FP16_FLAGS" to > "CpuAVX512_FP16" > > > >>> > > > >>> You don't say what's wrong with what there is right now. I for > > > >>> one think what we have is correct: If one disables BW, _all_ its > > > >>> dependents should be disabled as well, which transitively means all > dependents of FP16. > > > >>> > > > >> Hi Jan, > > > >> Agree with that " If one disables BW, _all_ its dependents should be > disabled as well ". > > > >> I saw the form of "CPU_ANY_AVX512F_FLAGS" today, and to be > consistent with it, I thought "CPU_ANY_AVX512_FP16_FLAGS" was wrong at > that time. But after reading your email, I found "CPU_ANY_AVX512F_FLAGS" > to be the only one that uses cpu_flags instead of CPU_ANY* . > > > >> > > > >> { "CPU_ANY_AVX512F_FLAGS", > > > >> > "CpuAVX512F|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ| > CPU_A > > > >> > NY_AVX512BW_FLAGS|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|C > puAVX5 > > > >> > 12_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_V > BMI2|Cp > > > >> > uAVX512_VNNI|CpuAVX512_BITALG|CpuAVX512_BF16|CpuAVX512_VP2INT > ERSE > > > >> CT" }, > > > >> > > > >> Regards, > > > >> Lili. > > > >> > > > >>> Jan > > > >>> > > > >>>> opcodes/ > > > >>>> > > > >>>> * i386-gen.c (cpu_flag_init): Change cpu_flags of > > > >>>> CPU_ANY_AVX512BW_FLAGS. > > > >>>> --- > > > >>>> opcodes/i386-gen.c | 2 +- > > > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >>>> > > > >>>> diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index > > > >>>> d18a7d2754..5dc224efdb 100644 > > > >>>> --- a/opcodes/i386-gen.c > > > >>>> +++ b/opcodes/i386-gen.c > > > >>>> @@ -382,7 +382,7 @@ static initializer cpu_flag_init[] = > > > >>>> { "CPU_ANY_AVX512DQ_FLAGS", > > > >>>> "CpuAVX512DQ" }, > > > >>>> { "CPU_ANY_AVX512BW_FLAGS", > > > >>>> - "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > > > >>>> + "CpuAVX512BW|CpuAVX512_FP16" }, > > > >>>> { "CPU_ANY_AVX512VL_FLAGS", > > > >>>> "CpuAVX512VL" }, > > > >>>> { "CPU_ANY_AVX512IFMA_FLAGS", > > > >> > > > > > > > > Since CPU_ANY_AVX512_FP16_FLAGS is the same as CpuAVX512_FP16, > > > > this change is nop. On the other hand, CPU_ANY shouldn't be used > > > > to define another CPU_ANY. > > > > > > Why? Imo that's exactly how it should be, as long as the purpose of > > > CPU_ANY_* is the use for processing of negative .arch directives. > > > > > > > Assuming AVX512_FP16 also requires BMI2, when AVX512F is disabled, > > AVX512_FP16 should be disabled, but not BMI2. > > > > I was wrong. The current code isn't wrong since > > { "CPU_ANY_AVX512BW_FLAGS", > "CpuAVX512BW|CPU_ANY_AVX512_FP16_FLAGS" }, > > indicates that disabling AVX512BW will also disable AVX512BW + > AVX512F16 + any ISAs which > depend on AVX512FP16. If there is another ISA which depends on > AVX512FP16, we don't > need to change CPU_ANY_AVX512BW_FLAGS. > Agree with you, Jan is right. The current code is correct, we don't need any changes here. Thanks, Lili. > -- > H.J. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-24 2:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-23 7:14 [PATCH] Correct cpu_flags for CPU_ANY_AVX512BW_FLAGS Cui,Lili 2022-06-23 7:29 ` Jan Beulich 2022-06-23 8:08 ` Cui, Lili 2022-06-23 16:04 ` H.J. Lu 2022-06-23 16:07 ` Jan Beulich 2022-06-23 16:31 ` H.J. Lu 2022-06-24 1:56 ` H.J. Lu 2022-06-24 2:03 ` Cui, Lili
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).