Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[AIX]Blocking the call of dladdr under _AIX#26513

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ranjitshs wants to merge1 commit intomicrosoft:main
base:main
Choose a base branch
Loading
fromranjitshs:aix-dladdr-fix

Conversation

@ranjitshs
Copy link
Contributor

@ranjitshsranjitshs commentedNov 6, 2025
edited
Loading

Description

In AIX, dladdr() is not supported so blocking the call of dladdr API under _AIX.
we don't have support of cpuinfo pkg also which generates a warning at runtime.

This PR is to fox the issues mentioned above.

Motivation and Context

  1. Fix for below compilation error
/home/buildusr/jenkins/workspace/onnxruntime-openxl/onnxruntime/onnxruntime/core/platform/posix/env.cc:562:9: error: unknown type name 'Dl_info'  562 |     if (Dl_info dl_info{};
  1. Fix for below warning during test application executions.

2025-11-06 07:23:44.176700000 [W:onnxruntime:Default, cpuid_info.cc:95 LogEarlyWarning] Unknown CPU vendor. cpuinfo_vendor value: 0

@ranjitshs
Copy link
ContributorAuthor

@tianleiwu@snnn@edgchen1@yuslepukhin
Please review the changes in this PR.
Let me know your comments/suggestions.

edgchen1 reacted with thumbs up emoji

}

PathStringGetRuntimePath()constoverride {
// In AIX, dladdr is not supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

is there another way to get the current shared library path on AIX?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No. I don't see any way to get these shared library paths in AIX.

}();

constauto* vendor_info =FindCpuVendorInfo(vendor);
// Do below logging only if CPUINFO_SUPPORTED by the OS and still vendor_info is not available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think that it is an implementation detail that the vendor info lookup depends on cpuinfo. I also think that if the lookup is unsuccessful, it is worth logging.

do you think that this information should be logged at a different level?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are you suggesting to use the same code but with INFO level of message ?

is it okay to define like below and use in case of AIX and if vendor_info is NULL after calling FindCpuVendorInfo()

constexpr auto kIBMCpuVendorInfo = CpuVendorInfo{cpuinfo_vendor_ibm, "IBM", 0x0000};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are you suggesting to use the same code but with INFO level of message ?

I'm suggesting keeping the logging. I am fine with changing the level.

is it okay to define like below and use in case of AIX and if vendor_info is NULL after calling FindCpuVendorInfo()

constexpr auto kIBMCpuVendorInfo = CpuVendorInfo{cpuinfo_vendor_ibm, "IBM", 0x0000};

doesdefined(_AIX) only apply to IBM CPUs? if so, then I think doing something like this is fine. perhaps an entry can be added to thekCpuVendorInfos table, andvendor in this function can be initialized tocpuinfo_vendor_ibm ifdefined(_AIX). also, the vendor ID can be the IBM PCI vendor ID value of0x1014 instead of 0x0000.

${onnxruntime_runtime_path_test_shared_library_src})

if (CMAKE_SYSTEM_NAMEMATCHES"AIX")
target_link_libraries(onnxruntime_runtime_path_test_shared_libraryPRIVATE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

please indent theif()/else() blocks

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I will update in next commit.

ASSERT_TRUE(std::filesystem::is_regular_file(canonical_shared_library_path));
}
#else
TEST(GetRuntimePathFromSharedLibraryTest, Basic) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

if GetRuntimePath() returns an empty path, it is not a valid one. perhaps the documentation needs to be updated, but I believe at least one place is relying on the returned path to be absolute.

if (!resolved_library_path.is_absolute()) {
resolved_library_path =Env::Default().GetRuntimePath() /std::move(resolved_library_path);
}
// if it's a provider bridge library we need to create ProviderLibrary first to ensure the dependencies are loaded
// like the onnxruntime_provider_shared library.
auto provider_library = std::make_unique<ProviderLibrary>(resolved_library_path.native().c_str(),
true,
ProviderLibraryPathType::Absolute);

if it is unsupported on AIX, I think it's not worth testing that it returns an empty path and we can just skip this test.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Okay. I will update and skip this test.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@edgchen1edgchen1edgchen1 left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ranjitshs@edgchen1

[8]ページ先頭

©2009-2025 Movatter.jp