Skip to content

Add some device discovery support for non-Windows platforms - #25228

Merged
Edward Chen (edgchen1) merged 49 commits into
mainfrom
edgchen1/device_discovery
Aug 19, 2025
Merged

Add some device discovery support for non-Windows platforms#25228
Edward Chen (edgchen1) merged 49 commits into
mainfrom
edgchen1/device_discovery

Conversation

@edgchen1

Copy link
Copy Markdown
Contributor

Description

Add some device discovery support for non-Windows platforms.

Motivation and Context

More device discovery support.

Comment thread onnxruntime/core/platform/apple/device_discovery.cc
Comment thread onnxruntime/core/platform/apple/device_discovery.cc Outdated
@edgchen1
Edward Chen (edgchen1) marked this pull request as ready for review August 15, 2025 02:56
@edgchen1 Edward Chen (edgchen1) changed the title [WIP] Add some device discovery support for non-Windows platforms Add some device discovery support for non-Windows platforms Aug 15, 2025
Comment thread cmake/onnxruntime_common.cmake
Comment thread include/onnxruntime/core/common/parse_string.h
Comment thread onnxruntime/core/platform/linux/device_discovery.cc Outdated
@edgchen1

Copy link
Copy Markdown
Contributor Author

Ok, I'll keep an eye on this then and submit a PR to enable it in the Java tests once this has been merged.

Adam Pocock (@Craigacp) FYI, merging this PR.

@edgchen1
Edward Chen (edgchen1) merged commit ebcce42 into main Aug 19, 2025
90 of 92 checks passed
@edgchen1
Edward Chen (edgchen1) deleted the edgchen1/device_discovery branch August 19, 2025 21:09
Adrian Lizarraga (adrianlizarraga) pushed a commit that referenced this pull request Aug 21, 2025
### Description
<!-- Describe your changes. -->

Add some device discovery support for non-Windows platforms.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

More device discovery support.
Edward Chen (edgchen1) added a commit that referenced this pull request Aug 22, 2025
### Description
<!-- Describe your changes. -->

Disable cpuinfo for ARM64EC builds. There's an error when linking to
cpuinfo built for ARM64EC when using `--use_vckpg`.

This issue was exposed by a recent change (#25228) but cpuinfo was
actually not being used before for ARM64EC. The macros here don't
properly account for ARM64EC:

https://github.com/microsoft/onnxruntime/blob/e6d3e085cb0bb96da7c3458b97316ecca234b37a/onnxruntime/core/common/cpuid_arch_definition.h#L8-L14

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Fix a packaging pipeline failure. Revert to the old behavior of not
calling cpuinfo from the CPUIDInfo ctor for ARM64EC.

This PR is just a workaround. The cpuinfo link issue needs more
investigation.
Adrian Lizarraga (adrianlizarraga) pushed a commit that referenced this pull request Aug 22, 2025
### Description
<!-- Describe your changes. -->

Disable cpuinfo for ARM64EC builds. There's an error when linking to
cpuinfo built for ARM64EC when using `--use_vckpg`.

This issue was exposed by a recent change (#25228) but cpuinfo was
actually not being used before for ARM64EC. The macros here don't
properly account for ARM64EC:

https://github.com/microsoft/onnxruntime/blob/e6d3e085cb0bb96da7c3458b97316ecca234b37a/onnxruntime/core/common/cpuid_arch_definition.h#L8-L14

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Fix a packaging pipeline failure. Revert to the old behavior of not
calling cpuinfo from the CPUIDInfo ctor for ARM64EC.

This PR is just a workaround. The cpuinfo link issue needs more
investigation.
Adrian Lizarraga (adrianlizarraga) added a commit that referenced this pull request Aug 25, 2025
### Description
Cherry-pick the following PRs into the `rel-1.23.0` branch:
- #25592
- #25622
- #25688
- #25729
- #25743
- #25769
- #25745
- #25761
- #25751
- #25716
- #25228
- #25768
- #25788
- #25747
- #25800
- #25818
- #25762
- #25749
- #25831


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

---------

Co-authored-by: quic-tirupath <quic_tirupath@quicinc.com>
Co-authored-by: quic-calvnguy <quic_calvnguy@quicinc.com>
Co-authored-by: qti-kromero <kromero@qti.qualcomm.com>
Co-authored-by: Jeff Kilpatrick <jkilpatrick@qti.qualcomm.com>
Co-authored-by: Scott McKay <skottmckay@gmail.com>
Co-authored-by: David Fan <30608893+jiafatom@users.noreply.github.com>
Co-authored-by: kuanyul-qti <kuanyul@qti.qualcomm.com>
Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com>
Co-authored-by: Chi Lo <54722500+chilo-ms@users.noreply.github.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Co-authored-by: Chunye Wang@AMD <chunywan@amd.com>
Co-authored-by: minfhong-qti <minfhong@qti.qualcomm.com>
Co-authored-by: Vishal Agarwal <vishala@nvidia.com>
Co-authored-by: Maximilian Müller <maximilianm@nvidia.com>
Co-authored-by: Maximilian Müller <44298237+gedoensmax@users.noreply.github.com>
Co-authored-by: Changming Sun <chasun@microsoft.com>
Co-authored-by: adrastogi <aditya.rastogi@microsoft.com>
Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ranjitshs

Ranjit Ranjan (ranjitshs) commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Edward Chen (@edgchen1)

FYI.
DeviceDiscoveryTest is failing in AIX , as CPUINFO_SUPPORTED and its dependency torch cpuinfo package is not tested/verified in AIX.

So I will be blocking this test the same way as it's blocked on wasm.

1: [----------] 1 test from DeviceDiscoveryTest
1: [ RUN      ] DeviceDiscoveryTest.HasCpuDevice
1: /home/buildusr/jenkins/workspace/onnxruntime-openxl/onnxruntime/onnxruntime/test/platform/device_discovery_test.cc:29: Failure
1: Expected: (cpu_devices[0].vendor_id) != (0), actual: 0 vs 0
 
 
[W:onnxruntime:Default, cpuid_info.cc:91 LogEarlyWarning] Unknown CPU vendor. cpuinfo_vendor value: 0

Maximilian Müller (gedoensmax) pushed a commit to gedoensmax/onnxruntime that referenced this pull request Sep 2, 2025
…t#25228)

### Description
<!-- Describe your changes. -->

Add some device discovery support for non-Windows platforms.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

More device discovery support.
Maximilian Müller (gedoensmax) pushed a commit to gedoensmax/onnxruntime that referenced this pull request Sep 2, 2025
### Description
<!-- Describe your changes. -->

Disable cpuinfo for ARM64EC builds. There's an error when linking to
cpuinfo built for ARM64EC when using `--use_vckpg`.

This issue was exposed by a recent change (microsoft#25228) but cpuinfo was
actually not being used before for ARM64EC. The macros here don't
properly account for ARM64EC:

https://github.com/microsoft/onnxruntime/blob/e6d3e085cb0bb96da7c3458b97316ecca234b37a/onnxruntime/core/common/cpuid_arch_definition.h#L8-L14

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Fix a packaging pipeline failure. Revert to the old behavior of not
calling cpuinfo from the CPUIDInfo ctor for ARM64EC.

This PR is just a workaround. The cpuinfo link issue needs more
investigation.
qti-yuduo pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Sep 24, 2025
…t#25228)

### Description
<!-- Describe your changes. -->

Add some device discovery support for non-Windows platforms.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

More device discovery support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants