[v1,1/1] aarch64: fix fp8 cpuinfo feature names

Message ID 20241202181450.2091371-2-claudio.bantaloukas@arm.com
State New
Headers
Series aarch64: fix fp8 cpuinfo feature names |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed

Commit Message

Claudio Bantaloukas Dec. 2, 2024, 6:14 p.m. UTC
  The previous version of the patch was based on the mistaken assumption that
features in /proc/cpuinfo had matching names to the feature names that gcc and
gas accept.
This patch enables the fp8 feature when the f8cvt feature is enabled, under the
assumption that fpmr is always enabled when f8cvt is.

Changelog:

gcc/
	* config/aarch64/aarch64-option-extensions.def: (fp8): fix FEATURE_STRING.
	(fp8fma, ssve-fp8fma): Likewise.
	(fp8dot4, ssve-fp8dot4, fp8dot2, ssve-fp8dot2): Likewise.
---
 gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
  

Comments

Kyrylo Tkachov Dec. 3, 2024, 10:24 a.m. UTC | #1
Hi Claudio,

> On 2 Dec 2024, at 19:14, Claudio Bantaloukas <claudio.bantaloukas@arm.com> wrote:
> 
> 
> The previous version of the patch was based on the mistaken assumption that
> features in /proc/cpuinfo had matching names to the feature names that gcc and
> gas accept.
> This patch enables the fp8 feature when the f8cvt feature is enabled, under the
> assumption that fpmr is always enabled when f8cvt is.
> 
> Changelog:
> 
> gcc/
> * config/aarch64/aarch64-option-extensions.def: (fp8): fix FEATURE_STRING.

Should start with a capital: “Fix”.

> (fp8fma, ssve-fp8fma): Likewise.
> (fp8dot4, ssve-fp8dot4, fp8dot2, ssve-fp8dot2): Likewise.

Ok with the adjusted ChangeLog, thanks.
FTR there’s no need for a 0/1 cover letter for such single patches. Is that a consequence of a git send-email workflow?
Kyrill

> ---
> gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
> index 90abb1c5edd..7c5633aa803 100644
> --- a/gcc/config/aarch64/aarch64-option-extensions.def
> +++ b/gcc/config/aarch64/aarch64-option-extensions.def
> @@ -243,21 +243,21 @@ AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the")
> 
> AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
> 
> -AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8")
> +AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "f8cvt")
> 
> -AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "fp8fma")
> +AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "f8fma")
> 
> -AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "ssve-fp8fma")
> +AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "smesf8fma")
> 
> AARCH64_OPT_EXTENSION("faminmax", FAMINMAX, (SIMD), (), (), "faminmax")
> 
> -AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "fp8dot4")
> +AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "f8dp4")
> 
> -AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "ssve-fp8dot4")
> +AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "smesf8dp4")
> 
> -AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "fp8dot2")
> +AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "f8dp2")
> 
> -AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "ssve-fp8dot2")
> +AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "smesf8dp2")
> 
> #undef AARCH64_OPT_FMV_EXTENSION
> #undef AARCH64_OPT_EXTENSION
  
Claudio Bantaloukas Dec. 3, 2024, 10:41 a.m. UTC | #2
On 12/3/2024 10:24 AM, Kyrylo Tkachov wrote:
> Hi Claudio,
> 
>> On 2 Dec 2024, at 19:14, Claudio Bantaloukas <claudio.bantaloukas@arm.com> wrote:
>>
>>
>> The previous version of the patch was based on the mistaken assumption that
>> features in /proc/cpuinfo had matching names to the feature names that gcc and
>> gas accept.
>> This patch enables the fp8 feature when the f8cvt feature is enabled, under the
>> assumption that fpmr is always enabled when f8cvt is.
>>
>> Changelog:
>>
>> gcc/
>> * config/aarch64/aarch64-option-extensions.def: (fp8): fix FEATURE_STRING.
> 
> Should start with a capital: “Fix”.
Thanks, will fix and push.

> 
>> (fp8fma, ssve-fp8fma): Likewise.
>> (fp8dot4, ssve-fp8dot4, fp8dot2, ssve-fp8dot2): Likewise.
> 
> Ok with the adjusted ChangeLog, thanks.
> FTR there’s no need for a 0/1 cover letter for such single patches. Is that a consequence of a git send-email workflow?

It is, I wanted to avoid adding the "ok for master" in the patch itself 
so I use cover letters everywhere.
Is it a problem if I do so?

Cheers,
Claudio
> Kyrill
> 
>> ---
>> gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
>> index 90abb1c5edd..7c5633aa803 100644
>> --- a/gcc/config/aarch64/aarch64-option-extensions.def
>> +++ b/gcc/config/aarch64/aarch64-option-extensions.def
>> @@ -243,21 +243,21 @@ AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the")
>>
>> AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
>>
>> -AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8")
>> +AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "f8cvt")
>>
>> -AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "fp8fma")
>> +AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "f8fma")
>>
>> -AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "ssve-fp8fma")
>> +AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "smesf8fma")
>>
>> AARCH64_OPT_EXTENSION("faminmax", FAMINMAX, (SIMD), (), (), "faminmax")
>>
>> -AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "fp8dot4")
>> +AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "f8dp4")
>>
>> -AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "ssve-fp8dot4")
>> +AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "smesf8dp4")
>>
>> -AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "fp8dot2")
>> +AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "f8dp2")
>>
>> -AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "ssve-fp8dot2")
>> +AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "smesf8dp2")
>>
>> #undef AARCH64_OPT_FMV_EXTENSION
>> #undef AARCH64_OPT_EXTENSION
>
  
Kyrylo Tkachov Dec. 3, 2024, 10:55 a.m. UTC | #3
> On 3 Dec 2024, at 11:41, Claudio Bantaloukas <claudio.bantaloukas@arm.com> wrote:
> 
> 
> 
> On 12/3/2024 10:24 AM, Kyrylo Tkachov wrote:
>> Hi Claudio,
>>> On 2 Dec 2024, at 19:14, Claudio Bantaloukas <claudio.bantaloukas@arm.com> wrote:
>>> 
>>> 
>>> The previous version of the patch was based on the mistaken assumption that
>>> features in /proc/cpuinfo had matching names to the feature names that gcc and
>>> gas accept.
>>> This patch enables the fp8 feature when the f8cvt feature is enabled, under the
>>> assumption that fpmr is always enabled when f8cvt is.
>>> 
>>> Changelog:
>>> 
>>> gcc/
>>> * config/aarch64/aarch64-option-extensions.def: (fp8): fix FEATURE_STRING.
>> Should start with a capital: “Fix”.
> Thanks, will fix and push.
> 
>>> (fp8fma, ssve-fp8fma): Likewise.
>>> (fp8dot4, ssve-fp8dot4, fp8dot2, ssve-fp8dot2): Likewise.
>> Ok with the adjusted ChangeLog, thanks.
>> FTR there’s no need for a 0/1 cover letter for such single patches. Is that a consequence of a git send-email workflow?
> 
> It is, I wanted to avoid adding the "ok for master" in the patch itself so I use cover letters everywhere.
> Is it a problem if I do so?

No, I don’t object to it. I think there are ways to have email content that doesn’t go into the commit message using the “scissors” notation “-- >8 --“, but feel free to use whatever’s comfortable for your setup.

Kyrill

> 
> Cheers,
> Claudio
>> Kyrill
>>> ---
>>> gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
>>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>> 
>>> diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
>>> index 90abb1c5edd..7c5633aa803 100644
>>> --- a/gcc/config/aarch64/aarch64-option-extensions.def
>>> +++ b/gcc/config/aarch64/aarch64-option-extensions.def
>>> @@ -243,21 +243,21 @@ AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the")
>>> 
>>> AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
>>> 
>>> -AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8")
>>> +AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "f8cvt")
>>> 
>>> -AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "fp8fma")
>>> +AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "f8fma")
>>> 
>>> -AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "ssve-fp8fma")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "smesf8fma")
>>> 
>>> AARCH64_OPT_EXTENSION("faminmax", FAMINMAX, (SIMD), (), (), "faminmax")
>>> 
>>> -AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "fp8dot4")
>>> +AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "f8dp4")
>>> 
>>> -AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "ssve-fp8dot4")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "smesf8dp4")
>>> 
>>> -AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "fp8dot2")
>>> +AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "f8dp2")
>>> 
>>> -AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "ssve-fp8dot2")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "smesf8dp2")
>>> 
>>> #undef AARCH64_OPT_FMV_EXTENSION
>>> #undef AARCH64_OPT_EXTENSION
> 
> -- 
> Claudio Bantaloukas
>
  
Richard Earnshaw (lists) Dec. 10, 2024, 4:51 p.m. UTC | #4
On 03/12/2024 10:41, Claudio Bantaloukas wrote:
> 
> 
> On 12/3/2024 10:24 AM, Kyrylo Tkachov wrote:
>> Hi Claudio,
>>
>>> On 2 Dec 2024, at 19:14, Claudio Bantaloukas 
>>> <claudio.bantaloukas@arm.com> wrote:
>>>
>>>
>>> The previous version of the patch was based on the mistaken 
>>> assumption that
>>> features in /proc/cpuinfo had matching names to the feature names 
>>> that gcc and
>>> gas accept.
>>> This patch enables the fp8 feature when the f8cvt feature is enabled, 
>>> under the
>>> assumption that fpmr is always enabled when f8cvt is.
>>>
>>> Changelog:
>>>
>>> gcc/
>>> * config/aarch64/aarch64-option-extensions.def: (fp8): fix 
>>> FEATURE_STRING.
>>
>> Should start with a capital: “Fix”.
> Thanks, will fix and push.
> 
>>
>>> (fp8fma, ssve-fp8fma): Likewise.
>>> (fp8dot4, ssve-fp8dot4, fp8dot2, ssve-fp8dot2): Likewise.
>>
>> Ok with the adjusted ChangeLog, thanks.
>> FTR there’s no need for a 0/1 cover letter for such single patches. Is 
>> that a consequence of a git send-email workflow?
> 
> It is, I wanted to avoid adding the "ok for master" in the patch itself 
> so I use cover letters everywhere.

Anything after a line with three dashes will not be added to the commit 
message (unless the committer overrides the string to match).  So in 
this patch the following text (and anything after that) would be dropped.

---
  gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)

> Is it a problem if I do so?
> 
> Cheers,
> Claudio
>> Kyrill
>>
>>> ---
>>> gcc/config/aarch64/aarch64-option-extensions.def | 14 +++++++-------
>>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/ 
>>> config/aarch64/aarch64-option-extensions.def
>>> index 90abb1c5edd..7c5633aa803 100644
>>> --- a/gcc/config/aarch64/aarch64-option-extensions.def
>>> +++ b/gcc/config/aarch64/aarch64-option-extensions.def
>>> @@ -243,21 +243,21 @@ AARCH64_OPT_EXTENSION("the", THE, (), (), (), 
>>> "the")
>>>
>>> AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
>>>
>>> -AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8")
>>> +AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "f8cvt")
>>>
>>> -AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "fp8fma")
>>> +AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "f8fma")
>>>
>>> -AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), 
>>> (), "ssve-fp8fma")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), 
>>> (), "smesf8fma")
>>>
>>> AARCH64_OPT_EXTENSION("faminmax", FAMINMAX, (SIMD), (), (), "faminmax")
>>>
>>> -AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "fp8dot4")
>>> +AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "f8dp4")
>>>
>>> -AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), 
>>> (), (), "ssve-fp8dot4")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), 
>>> (), (), "smesf8dp4")
>>>
>>> -AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "fp8dot2")
>>> +AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "f8dp2")
>>>
>>> -AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), 
>>> (), (), "ssve-fp8dot2")
>>> +AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), 
>>> (), (), "smesf8dp2")
>>>
>>> #undef AARCH64_OPT_FMV_EXTENSION
>>> #undef AARCH64_OPT_EXTENSION
>>
>
  

Patch

diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
index 90abb1c5edd..7c5633aa803 100644
--- a/gcc/config/aarch64/aarch64-option-extensions.def
+++ b/gcc/config/aarch64/aarch64-option-extensions.def
@@ -243,21 +243,21 @@  AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the")
 
 AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
 
-AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8")
+AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "f8cvt")
 
-AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "fp8fma")
+AARCH64_OPT_EXTENSION("fp8fma", FP8FMA, (FP8), (), (), "f8fma")
 
-AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "ssve-fp8fma")
+AARCH64_OPT_EXTENSION("ssve-fp8fma", SSVE_FP8FMA, (SME2,FP8), (), (), "smesf8fma")
 
 AARCH64_OPT_EXTENSION("faminmax", FAMINMAX, (SIMD), (), (), "faminmax")
 
-AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "fp8dot4")
+AARCH64_OPT_EXTENSION("fp8dot4", FP8DOT4, (FP8FMA), (), (), "f8dp4")
 
-AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "ssve-fp8dot4")
+AARCH64_OPT_EXTENSION("ssve-fp8dot4", SSVE_FP8DOT4, (SSVE_FP8FMA), (), (), "smesf8dp4")
 
-AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "fp8dot2")
+AARCH64_OPT_EXTENSION("fp8dot2", FP8DOT2, (FP8DOT4), (), (), "f8dp2")
 
-AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "ssve-fp8dot2")
+AARCH64_OPT_EXTENSION("ssve-fp8dot2", SSVE_FP8DOT2, (SSVE_FP8DOT4), (), (), "smesf8dp2")
 
 #undef AARCH64_OPT_FMV_EXTENSION
 #undef AARCH64_OPT_EXTENSION