Skip to content

Commit e782546

Browse files
committed
Minor repositioning of new a64fx/sve code.
Details: - Changed the order of the new A64fx and SVE code fragments to appear as the beginning of the armv8a-related code (rather appearing after other armv8a code). - Fixed what is probably a copy-paste bug in frame/base/bli_cpuid.c. Previously, the a64fx conditional check was guarded by the cpp macro BLIS_CONFIG_ARMSVE, which has now been changed to BLIS_CONFIG_A64FX.
1 parent e0705b2 commit e782546

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

config_registry

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ piledriver: piledriver
3232
bulldozer: bulldozer
3333

3434
# ARM architectures.
35+
armsve: armsve/armsve
36+
a64fx: a64fx/armsve
3537
thunderx2: thunderx2/armv8a
3638
cortexa57: cortexa57/armv8a
3739
cortexa53: cortexa53/armv8a
38-
armsve: armsve/armsve
39-
a64fx: a64fx/armsve
4040
cortexa15: cortexa15/armv7a
4141
cortexa9: cortexa9/armv7a
4242

frame/base/bli_arch.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ void bli_arch_set_id( void )
173173
#endif
174174

175175
// ARM microarchitectures.
176+
#ifdef BLIS_FAMILY_ARMSVE
177+
id = BLIS_ARCH_ARMSVE;
178+
#endif
179+
#ifdef BLIS_FAMILY_A64FX
180+
id = BLIS_ARCH_A64FX;
181+
#endif
176182
#ifdef BLIS_FAMILY_THUNDERX2
177183
id = BLIS_ARCH_THUNDERX2;
178184
#endif
@@ -182,12 +188,6 @@ void bli_arch_set_id( void )
182188
#ifdef BLIS_FAMILY_CORTEXA53
183189
id = BLIS_ARCH_CORTEXA53;
184190
#endif
185-
#ifdef BLIS_FAMILY_ARMSVE
186-
id = BLIS_ARCH_ARMSVE;
187-
#endif
188-
#ifdef BLIS_FAMILY_A64FX
189-
id = BLIS_ARCH_A64FX;
190-
#endif
191191
#ifdef BLIS_FAMILY_CORTEXA15
192192
id = BLIS_ARCH_CORTEXA15;
193193
#endif

frame/base/bli_cpuid.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -455,21 +455,21 @@ arch_t bli_cpuid_query_id( void )
455455
{
456456
// Check for each ARMv8 configuration that is enabled, check for that
457457
// microarchitecture. We check from most recent to most dated.
458+
#ifdef BLIS_CONFIG_ARMSVE
459+
if ( bli_cpuid_is_armsve( model, part, features ) )
460+
return BLIS_ARCH_ARMSVE;
461+
#endif
462+
#ifdef BLIS_CONFIG_A64FX
463+
if ( bli_cpuid_is_a64fx( model, part, features ) )
464+
return BLIS_ARCH_A64FX;
465+
#endif
458466
#ifdef BLIS_CONFIG_THUNDERX2
459467
if ( bli_cpuid_is_thunderx2( model, part, features ) )
460468
return BLIS_ARCH_THUNDERX2;
461469
#endif
462470
#ifdef BLIS_CONFIG_CORTEXA57
463471
if ( bli_cpuid_is_cortexa57( model, part, features ) )
464472
return BLIS_ARCH_CORTEXA57;
465-
#endif
466-
#ifdef BLIS_CONFIG_ARMSVE
467-
if ( bli_cpuid_is_armsve( model, part, features ) )
468-
return BLIS_ARCH_ARMSVE;
469-
#endif
470-
#ifdef BLIS_CONFIG_ARMSVE
471-
if ( bli_cpuid_is_a64fx( model, part, features ) )
472-
return BLIS_ARCH_A64FX;
473473
#endif
474474
// If none of the other sub-configurations were detected, return
475475
// the 'generic' arch_t id value.

frame/include/bli_arch_config.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ CNTX_INIT_PROTS( bulldozer )
8383

8484
// -- ARM architectures --
8585

86+
#ifdef BLIS_CONFIG_ARMSVE
87+
CNTX_INIT_PROTS( armsve )
88+
#endif
89+
#ifdef BLIS_CONFIG_A64FX
90+
CNTX_INIT_PROTS( a64fx )
91+
#endif
8692
#ifdef BLIS_CONFIG_THUNDERX2
8793
CNTX_INIT_PROTS( thunderx2 )
8894
#endif
@@ -92,12 +98,6 @@ CNTX_INIT_PROTS( cortexa57 )
9298
#ifdef BLIS_CONFIG_CORTEXA53
9399
CNTX_INIT_PROTS( cortexa53 )
94100
#endif
95-
#ifdef BLIS_CONFIG_ARMSVE
96-
CNTX_INIT_PROTS( armsve )
97-
#endif
98-
#ifdef BLIS_CONFIG_A64FX
99-
CNTX_INIT_PROTS( a64fx )
100-
#endif
101101
#ifdef BLIS_CONFIG_CORTEXA15
102102
CNTX_INIT_PROTS( cortexa15 )
103103
#endif
@@ -189,6 +189,12 @@ CNTX_INIT_PROTS( generic )
189189

190190
// -- ARM architectures --
191191

192+
#ifdef BLIS_FAMILY_ARMSVE
193+
#include "bli_family_armsve.h"
194+
#endif
195+
#ifdef BLIS_FAMILY_A64FX
196+
#include "bli_family_a64fx.h"
197+
#endif
192198
#ifdef BLIS_FAMILY_THUNDERX2
193199
#include "bli_family_thunderx2.h"
194200
#endif
@@ -198,12 +204,6 @@ CNTX_INIT_PROTS( generic )
198204
#ifdef BLIS_FAMILY_CORTEXA53
199205
#include "bli_family_cortexa53.h"
200206
#endif
201-
#ifdef BLIS_FAMILY_ARMSVE
202-
#include "bli_family_armsve.h"
203-
#endif
204-
#ifdef BLIS_FAMILY_A64FX
205-
#include "bli_family_a64fx.h"
206-
#endif
207207
#ifdef BLIS_FAMILY_CORTEXA15
208208
#include "bli_family_cortexa15.h"
209209
#endif

frame/include/bli_type_defs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,11 +1005,11 @@ typedef enum
10051005
BLIS_ARCH_BULLDOZER,
10061006

10071007
// ARM
1008+
BLIS_ARCH_ARMSVE,
1009+
BLIS_ARCH_A64FX,
10081010
BLIS_ARCH_THUNDERX2,
10091011
BLIS_ARCH_CORTEXA57,
10101012
BLIS_ARCH_CORTEXA53,
1011-
BLIS_ARCH_ARMSVE,
1012-
BLIS_ARCH_A64FX,
10131013
BLIS_ARCH_CORTEXA15,
10141014
BLIS_ARCH_CORTEXA9,
10151015

@@ -1031,7 +1031,7 @@ typedef enum
10311031

10321032
// NOTE: This value must be updated to reflect the number of enum values
10331033
// listed above for arch_t!
1034-
#define BLIS_NUM_ARCHS 25
1034+
//#define BLIS_NUM_ARCHS 25
10351035

10361036

10371037
//

0 commit comments

Comments
 (0)