Skip to content

Commit 450d366

Browse files
committed
fix(pathfinder): use platform descriptor fields for supported libnames
Prevent import-time failures after the descriptor-catalog refactor by deriving availability from linux/windows descriptor fields instead of removed helpers. Remove an unused catalog-writer variable so pre-commit remains green. Made-with: Cursor
1 parent d06744a commit 450d366

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
# All libnames recognized by load_nvidia_dynamic_lib, across all categories
3737
# (CTK, third-party, driver).
3838
_ALL_KNOWN_LIBNAMES: frozenset[str] = frozenset(LIB_DESCRIPTORS)
39-
_ALL_SUPPORTED_LIBNAMES: frozenset[str] = frozenset(name for name, desc in LIB_DESCRIPTORS.items() if desc.sonames)
39+
_ALL_SUPPORTED_LIBNAMES: frozenset[str] = frozenset(
40+
name for name, desc in LIB_DESCRIPTORS.items() if (desc.windows_dlls if IS_WINDOWS else desc.linux_sonames)
41+
)
4042
_PLATFORM_NAME = "Windows" if IS_WINDOWS else "Linux"
4143

4244
# Driver libraries: shipped with the NVIDIA display driver, always on the

toolshed/_catalog_writer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def update_specs(
166166
updates: dict[str, dict[str, object]],
167167
) -> tuple[DescriptorSpec, ...]:
168168
"""Apply field updates to matching specs by name, preserving order."""
169-
by_name = {spec.name: spec for spec in catalog}
170169
result = []
171170
for spec in catalog:
172171
if spec.name in updates:

0 commit comments

Comments
 (0)