-
Notifications
You must be signed in to change notification settings - Fork 142
Add AIX support #1065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KV2773
wants to merge
4
commits into
microsoft:main
Choose a base branch
from
KV2773:aix-platform
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add AIX support #1065
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,34 @@ | ||
| --- ./blingfireclient.library/inc/FAConfig_orig.h 2026-05-19 03:27:38.241882009 -0500 | ||
| +++ ./blingfireclient.library/inc/FAConfig.h 2026-05-19 03:29:23.720979389 -0500 | ||
| @@ -11,6 +11,7 @@ | ||
| #define NEW new | ||
| #endif | ||
|
|
||
| +#include <stdio.h> | ||
| #if _MSC_VER < 1400 | ||
| # ifndef fopen_s | ||
| # define fopen_s(ppF,pN,pA) int(0); *ppF = fopen(pN,pA); | ||
| @@ -23,13 +24,12 @@ | ||
| #include <ctype.h> | ||
| #include <fcntl.h> | ||
|
|
||
| -#ifdef BLING_FIRE_MAC | ||
| +#if defined(BLING_FIRE_MAC) || defined(_AIX) | ||
| #include <string> | ||
| #else | ||
| #include <malloc.h> | ||
| #endif | ||
|
|
||
| -#include <stdio.h> | ||
| #include <stdlib.h> | ||
| #include <string.h> | ||
| #include <cmath> | ||
| @@ -79,7 +79,7 @@ | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| -/* because we have stdint.h | ||
| +/* because we have stdint.h | ||
| #ifndef __int32 | ||
| #define __int32 int32_t | ||
| #endif | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,13 @@ | ||
| --- ./dr_mp3.h 2026-03-28 10:41:13.180505219 -0500 | ||
| +++ ./dr_mp3.h 2026-03-28 10:41:06.567807627 -0500 | ||
| @@ -86,6 +86,10 @@ | ||
| #ifndef dr_mp3_h | ||
| #define dr_mp3_h | ||
|
|
||
| +#if defined(_AIX) && defined(hz) | ||
| +#undef hz | ||
| +#endif | ||
| + | ||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif |
This file contains hidden or 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 hidden or 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,19 @@ | ||
| --- a/3rdparty/libpng/CMakeLists.txt | ||
| +++ b/3rdparty/libpng/CMakeLists.txt | ||
| @@ -56,11 +56,12 @@ else() | ||
| endif() | ||
|
|
||
| -if(PPC64LE OR PPC64) | ||
| - # VSX3 features are backwards compatible | ||
| - if(";${CPU_BASELINE_FINAL};" MATCHES "VSX.*" | ||
| - AND NOT PPC64) | ||
| +# Enable PowerPC VSX optimizations on PowerPC systems (Linux) and AIX | ||
| +if(PPC64LE OR PPC64 OR CMAKE_SYSTEM_NAME MATCHES "AIX") | ||
| + # Enable VSX on PowerPC (AIX and Linux) | ||
| + if(";${CPU_BASELINE_FINAL};" MATCHES "VSX.*" OR CMAKE_SYSTEM_NAME MATCHES "AIX") | ||
| list(APPEND lib_srcs powerpc/powerpc_init.c powerpc/filter_vsx_intrinsics.c) | ||
| add_definitions(-DPNG_POWERPC_VSX_OPT=2) | ||
| + message(STATUS "libpng: PowerPC VSX optimizations enabled") | ||
| else() | ||
| add_definitions(-DPNG_POWERPC_VSX_OPT=0) | ||
| endif() |
This file contains hidden or 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,46 @@ | ||
|
|
||
| --- ./modules/core/src/rand.cpp 2026-03-25 07:34:27.666925971 -0500 | ||
| +++ ./modules/core/src/rand.cpp 2026-03-25 07:40:40.661543262 -0500 | ||
| @@ -48,6 +48,10 @@ | ||
|
|
||
| #include "precomp.hpp" | ||
|
|
||
| +#if defined(_AIX) && defined(hz) | ||
| +#undef hz | ||
| +#endif | ||
| + | ||
| namespace cv | ||
| { | ||
|
|
||
| --- ./modules/core/src/system.cpp 2026-03-25 07:50:38.785508231 -0500 | ||
| +++ ./modules/core/src/system.cpp 2026-03-25 07:50:25.791118063 -0500 | ||
| @@ -130,7 +130,7 @@ | ||
| # include <fcntl.h> | ||
| #if defined __QNXNTO__ | ||
| # include <sys/elf.h> | ||
| -#else | ||
| +#elif !defined (_AIX) | ||
| # include <elf.h> | ||
| #endif | ||
| #if defined __ANDROID__ || defined __linux__ | ||
| @@ -146,8 +146,8 @@ | ||
| #endif | ||
|
|
||
|
|
||
| -#if (defined __ppc64__ || defined __PPC64__) && defined __unix__ | ||
| +#if (defined __ppc64__ || defined __PPC64__) && defined __unix__ && !defined _AIX | ||
| # include "sys/auxv.h" | ||
| # ifndef AT_HWCAP2 | ||
| # define AT_HWCAP2 26 | ||
| # endif | ||
| @@ -615,7 +615,7 @@ | ||
| #ifdef __mips_msa | ||
| have[CV_CPU_MSA] = true; | ||
| #endif | ||
|
|
||
| - #if (defined __ppc64__ || defined __PPC64__) && defined __unix__ | ||
| + #if (defined __ppc64__ || defined __PPC64__) && defined __unix__ && !defined _AIX | ||
| unsigned int hwcap = getauxval(AT_HWCAP); | ||
| if (hwcap & PPC_FEATURE_HAS_VSX) { | ||
| hwcap = getauxval(AT_HWCAP2); | ||
|
|
This file contains hidden or 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 hidden or 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,13 @@ | ||
| --- ./src/util.h_orig 2026-03-13 04:45:26.898234633 -0500 | ||
| +++ ./src/util.h 2026-03-13 05:08:47.892826822 -0500 | ||
| @@ -36,7 +36,9 @@ | ||
| #include <pthread.h> | ||
| #endif | ||
|
|
||
| -#if !defined(__APPLE__) && !defined(_WIN32) | ||
| +#if defined(_AIX) | ||
| +#define IS_BIG_ENDIAN | ||
| +#elif !defined(__APPLE__) && !defined(_WIN32) | ||
| #include <endian.h> | ||
| #if BYTE_ORDER == __BIG_ENDIAN | ||
| #define IS_BIG_ENDIAN |
This file contains hidden or 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,11 @@ | ||
| --- ./src/unicode_script.h_orig 2026-04-06 23:28:59.276085358 -0500 | ||
| +++ ./src/unicode_script.h 2026-04-06 23:29:39.906085511 -0500 | ||
| @@ -19,7 +19,7 @@ | ||
|
|
||
| namespace sentencepiece { | ||
| namespace unicode_script { | ||
| -enum ScriptType { | ||
| +enum ScriptType : int32_t { | ||
| U_Adlam, | ||
| U_Ahom, | ||
| U_Anatolian_Hieroglyphs, |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,3 @@ | ||
| RegisterCustomOps | ||
| AddExternalCustomOp | ||
| GetActiveOrtAPIVersion |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.