-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
239 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
easybuild/easyconfigs/b/BLIS/BLIS-0.8.1_enable_ppc_autodetect.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Add autodetection for POWER7, POWER9 & POWER10 | ||
See https://github.com/amd/blis/pull/6 | ||
|
||
Author: Alexander Grund (TU Dresden) | ||
diff -aur a/frame/base/bli_cpuid.c b/frame/base/bli_cpuid.c | ||
--- a/frame/base/bli_cpuid.c 2021-03-22 23:42:33.000000000 +0100 | ||
+++ b/frame/base/bli_cpuid.c 2022-07-07 14:05:13.627541000 +0200 | ||
@@ -429,7 +429,7 @@ | ||
return TRUE; | ||
} | ||
|
||
-#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
arch_t bli_cpuid_query_id( void ) | ||
{ | ||
@@ -484,9 +484,14 @@ | ||
return BLIS_ARCH_GENERIC; | ||
} | ||
} | ||
- else if ( vendor == VENDOR_UNKNOWN ) | ||
+ else if ( vendor == VENDOR_IBM ) | ||
{ | ||
- return BLIS_ARCH_GENERIC; | ||
+ if ( model == MODEL_POWER7) | ||
+ return BLIS_ARCH_POWER7; | ||
+ else if ( model == MODEL_POWER9) | ||
+ return BLIS_ARCH_POWER9; | ||
+ else if ( model == MODEL_POWER10) | ||
+ return BLIS_ARCH_POWER10; | ||
} | ||
|
||
return BLIS_ARCH_GENERIC; | ||
@@ -985,7 +990,7 @@ | ||
} | ||
} | ||
|
||
-#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
#define TEMP_BUFFER_SIZE 200 | ||
|
||
@@ -1007,6 +1012,20 @@ | ||
char feat_str[ TEMP_BUFFER_SIZE ]; | ||
char* r_val; | ||
|
||
+#ifdef _ARCH_PPC | ||
+ r_val = find_string_in( "cpu", proc_str, TEMP_BUFFER_SIZE, pci_str ); | ||
+ if ( r_val == NULL ) return VENDOR_IBM; | ||
+ | ||
+ if ( strstr( proc_str, "POWER7" ) != NULL ) | ||
+ *model = MODEL_POWER7; | ||
+ else if ( strstr( proc_str, "POWER9" ) != NULL ) | ||
+ *model = MODEL_POWER9; | ||
+ else if ( strstr( proc_str, "POWER10" ) != NULL ) | ||
+ *model = MODEL_POWER10; | ||
+ | ||
+ return VENDOR_IBM; | ||
+#endif | ||
+ | ||
//printf( "bli_cpuid_query(): beginning search\n" ); | ||
|
||
// Search /proc/cpuinfo for the 'Processor' entry. | ||
diff -aur a/frame/base/bli_cpuid.h b/frame/base/bli_cpuid.h | ||
--- a/frame/base/bli_cpuid.h 2021-03-22 23:42:33.000000000 +0100 | ||
+++ b/frame/base/bli_cpuid.h 2022-07-07 13:59:51.620586000 +0200 | ||
@@ -158,19 +158,23 @@ | ||
FEATURE_AVX512VL = 0x4000 | ||
}; | ||
|
||
-#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
char* find_string_in( char* target, char* buffer, size_t buf_len, char* filepath ); | ||
|
||
enum | ||
{ | ||
VENDOR_ARM = 0, | ||
+ VENDOR_IBM, | ||
VENDOR_UNKNOWN | ||
}; | ||
enum | ||
{ | ||
MODEL_ARMV7 = 0, | ||
MODEL_ARMV8, | ||
+ MODEL_POWER7, | ||
+ MODEL_POWER9, | ||
+ MODEL_POWER10, | ||
MODEL_UNKNOWN | ||
}; | ||
enum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
easybuild/easyconfigs/b/BLIS/BLIS-0.9.0_enable_ppc_autodetect.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Add autodetection for POWER7, POWER9 & POWER10 | ||
See https://github.com/amd/blis/pull/6 | ||
|
||
Author: Alexander Grund (TU Dresden) | ||
diff -ur a/frame/base/bli_cpuid.c b/frame/base/bli_cpuid.c | ||
--- a/frame/base/bli_cpuid.c 2022-04-01 15:12:06.000000000 +0200 | ||
+++ b/frame/base/bli_cpuid.c 2022-07-07 16:15:43.724020000 +0200 | ||
@@ -485,7 +485,7 @@ | ||
return TRUE; | ||
} | ||
|
||
-#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
arch_t bli_cpuid_query_id( void ) | ||
{ | ||
@@ -530,9 +530,14 @@ | ||
return BLIS_ARCH_GENERIC; | ||
} | ||
} | ||
- else if ( vendor == VENDOR_UNKNOWN ) | ||
+ else if ( vendor == VENDOR_IBM ) | ||
{ | ||
- return BLIS_ARCH_GENERIC; | ||
+ if ( model == MODEL_POWER7) | ||
+ return BLIS_ARCH_POWER7; | ||
+ else if ( model == MODEL_POWER9) | ||
+ return BLIS_ARCH_POWER9; | ||
+ else if ( model == MODEL_POWER10) | ||
+ return BLIS_ARCH_POWER10; | ||
} | ||
|
||
return BLIS_ARCH_GENERIC; | ||
@@ -1203,7 +1208,7 @@ | ||
return VENDOR_ARM; | ||
} | ||
|
||
-#elif defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
/* | ||
I can't easily find documentation to do this as for aarch64, though | ||
@@ -1240,6 +1245,20 @@ | ||
char feat_str[ TEMP_BUFFER_SIZE ]; | ||
char* r_val; | ||
|
||
+#ifdef _ARCH_PPC | ||
+ r_val = find_string_in( "cpu", proc_str, TEMP_BUFFER_SIZE, pci_str ); | ||
+ if ( r_val == NULL ) return VENDOR_IBM; | ||
+ | ||
+ if ( strstr( proc_str, "POWER7" ) != NULL ) | ||
+ *model = MODEL_POWER7; | ||
+ else if ( strstr( proc_str, "POWER9" ) != NULL ) | ||
+ *model = MODEL_POWER9; | ||
+ else if ( strstr( proc_str, "POWER10" ) != NULL ) | ||
+ *model = MODEL_POWER10; | ||
+ | ||
+ return VENDOR_IBM; | ||
+#endif | ||
+ | ||
//printf( "bli_cpuid_query(): beginning search\n" ); | ||
|
||
// Search /proc/cpuinfo for the 'Processor' entry. | ||
diff -ur a/frame/base/bli_cpuid.h b/frame/base/bli_cpuid.h | ||
--- a/frame/base/bli_cpuid.h 2022-04-01 15:12:06.000000000 +0200 | ||
+++ b/frame/base/bli_cpuid.h 2022-07-07 16:09:22.617023000 +0200 | ||
@@ -161,19 +161,23 @@ | ||
FEATURE_AVX512VL = 0x4000 | ||
}; | ||
|
||
-#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) | ||
+#elif defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_ARCH_PPC) | ||
|
||
char* find_string_in( char* target, char* buffer, size_t buf_len, char* filepath ); | ||
|
||
enum | ||
{ | ||
VENDOR_ARM = 0, | ||
+ VENDOR_IBM, | ||
VENDOR_UNKNOWN | ||
}; | ||
enum | ||
{ | ||
MODEL_ARMV7 = 0, | ||
MODEL_ARMV8, | ||
+ MODEL_POWER7, | ||
+ MODEL_POWER9, | ||
+ MODEL_POWER10, | ||
MODEL_UNKNOWN | ||
}; | ||
enum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters