Skip to content

winml sys reports Machine: AMD64 on Windows ARM64 hosts #704

@timenick

Description

@timenick

Bug

winml sys reports Machine: AMD64 on Windows ARM64 hosts (Snapdragon X with Prism emulation).

Cause

The project venv uses x64 Python because torch has no Windows-ARM64 wheel. platform.machine() returns the process architecture, not the host. PROCESSOR_ARCHITEW6432 is empty on Snapdragon X — Prism emulation doesn't set it — so reading that env var doesn't help either.

Fix

Use the Win32 IsWow64Process2 API to read the host machine type, falling back to platform.machine() if the call fails.

Repro

On a Snapdragon X dev box using the project's default x64 venv:

  • Before: Machine: AMD64
  • After: Machine: ARM64

Metadata

Metadata

Assignees

Labels

P0Critical — blocking, crash, data lossbugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions