Skip to content

Commit d063eb3

Browse files
committed
Document Windows architecture selection
1 parent e220d5b commit d063eb3

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

‎cuda_pathfinder/cuda/pathfinder/_binaries/find_nvidia_binary_utility.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ def find_nvidia_binary_utility(utility_name: str) -> str | None:
183183
UnsupportedBinaryError: If ``utility_name`` is not in the supported set
184184
(see ``SUPPORTED_BINARY_UTILITIES``).
185185
186+
Windows on ARM (WoA) Note:
187+
Binary utilities execute in separate processes and do not need to match
188+
the Python process architecture. When choosing among architecture-specific
189+
Windows layouts, this API deliberately targets the native machine
190+
architecture rather than the Python interpreter architecture. For
191+
example, standalone ``nsys`` and ``ncu`` discovery under x64 Python on an
192+
Arm64 machine selects the Arm64 target. This differs from
193+
``load_nvidia_dynamic_lib`` and ``find_static_lib``, which target the
194+
Python interpreter architecture.
195+
186196
Search order:
187197
1. **NVIDIA Python wheels**
188198

‎cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,15 @@ def load_nvidia_dynamic_lib(libname: str) -> LoadedDL:
231231
DynamicLibNotFoundError: If the library cannot be found or loaded.
232232
RuntimeError: If Python is not 64-bit.
233233
234+
Windows on ARM (WoA) Note:
235+
On Windows, this API aims to load a dynamic library whose architecture
236+
matches the Python interpreter architecture. For example, x64 Python
237+
running on an Arm64 machine targets an x64 DLL, while native Arm64 Python
238+
targets an Arm64 DLL. A library loaded into the Python process must be
239+
compatible with that process. This differs from
240+
``find_nvidia_binary_utility``, which targets the native machine
241+
architecture when selecting architecture-specific executables.
242+
234243
Search order:
235244
0. **Already loaded in the current process**
236245

‎cuda_pathfinder/cuda/pathfinder/_static_libs/find_static_lib.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,13 @@ def find_static_lib(name: str) -> str:
175175
Raises:
176176
ValueError: If ``name`` is not a supported static library.
177177
StaticLibNotFoundError: If the static library cannot be found.
178+
179+
Windows on ARM (WoA) Note:
180+
On Windows, this API aims to return the path to a static library whose
181+
architecture matches the Python interpreter architecture. For example,
182+
x64 Python running on an Arm64 machine targets the x64 library, while
183+
native Arm64 Python targets the Arm64 library. This differs from
184+
``find_nvidia_binary_utility``, which targets the native machine
185+
architecture when selecting architecture-specific executables.
178186
"""
179187
return locate_static_lib(name).abs_path

0 commit comments

Comments
 (0)