1919from cuda .pathfinder ._binaries .find_nvidia_binary_utility import (
2020 find_nvidia_binary_utility as _find_nvidia_binary_utility ,
2121)
22- from cuda .pathfinder ._binaries .supported_nvidia_binaries import SUPPORTED_BINARIES_ALL
22+ from cuda .pathfinder ._binaries .supported_nvidia_binaries import (
23+ SUPPORTED_BINARIES_ALL ,
24+ SUPPORTED_BINARIES_CTK_COMPANION_TAGS ,
25+ )
2326from cuda .pathfinder ._dynamic_libs .lib_descriptor import LIB_DESCRIPTORS
2427from cuda .pathfinder ._dynamic_libs .load_dl_common import LoadedDL
2528from cuda .pathfinder ._dynamic_libs .load_nvidia_dynamic_lib import (
3336)
3437from cuda .pathfinder ._headers .header_descriptor import HEADER_DESCRIPTORS
3538from cuda .pathfinder ._static_libs .find_bitcode_lib import (
39+ SUPPORTED_BITCODE_LIBS_CTK_COMPANION_TAGS ,
3640 LocatedBitcodeLib ,
3741)
3842from cuda .pathfinder ._static_libs .find_bitcode_lib import (
3943 locate_bitcode_lib as _locate_bitcode_lib ,
4044)
4145from cuda .pathfinder ._static_libs .find_static_lib import (
46+ SUPPORTED_STATIC_LIBS_CTK_COMPANION_TAGS ,
4247 LocatedStaticLib ,
4348)
4449from cuda .pathfinder ._static_libs .find_static_lib import (
@@ -123,6 +128,8 @@ class ResolvedItem:
123128 ctk_root : str | None
124129 ctk_version : CtkVersion | None
125130 ctk_version_source : str | None
131+ dynamic_link_component : str | None
132+ ctk_companion_tags : tuple [str , ...]
126133
127134 def describe (self ) -> str :
128135 found_via = "" if self .found_via is None else f" via { self .found_via } "
@@ -317,6 +324,8 @@ def _resolve_item(
317324 packaged_with : PackagedWith ,
318325 abs_path : str ,
319326 found_via : str | None ,
327+ dynamic_link_component : str | None = None ,
328+ ctk_companion_tags : tuple [str , ...] = (),
320329) -> ResolvedItem :
321330 ctk_metadata = _ctk_metadata_for_abs_path (abs_path )
322331 return ResolvedItem (
@@ -328,6 +337,8 @@ def _resolve_item(
328337 ctk_root = None if ctk_metadata is None else ctk_metadata .ctk_root ,
329338 ctk_version = None if ctk_metadata is None else ctk_metadata .ctk_version ,
330339 ctk_version_source = None if ctk_metadata is None else ctk_metadata .source ,
340+ dynamic_link_component = dynamic_link_component ,
341+ ctk_companion_tags = ctk_companion_tags ,
331342 )
332343
333344
@@ -343,6 +354,8 @@ def _resolve_dynamic_lib_item(libname: str, loaded: LoadedDL) -> ResolvedItem:
343354 packaged_with = desc .packaged_with ,
344355 abs_path = loaded .abs_path ,
345356 found_via = loaded .found_via ,
357+ dynamic_link_component = desc .dynamic_link_component ,
358+ ctk_companion_tags = desc .ctk_companion_tags ,
346359 )
347360
348361
@@ -359,6 +372,7 @@ def _resolve_header_item(libname: str, located: LocatedHeaderDir) -> ResolvedIte
359372 packaged_with = desc .packaged_with ,
360373 abs_path = metadata_abs_path ,
361374 found_via = located .found_via ,
375+ ctk_companion_tags = desc .ctk_companion_tags ,
362376 )
363377
364378
@@ -370,6 +384,7 @@ def _resolve_static_lib_item(located: LocatedStaticLib) -> ResolvedItem:
370384 packaged_with = packaged_with ,
371385 abs_path = located .abs_path ,
372386 found_via = located .found_via ,
387+ ctk_companion_tags = SUPPORTED_STATIC_LIBS_CTK_COMPANION_TAGS .get (located .name , ()),
373388 )
374389
375390
@@ -381,6 +396,7 @@ def _resolve_bitcode_lib_item(located: LocatedBitcodeLib) -> ResolvedItem:
381396 packaged_with = packaged_with ,
382397 abs_path = located .abs_path ,
383398 found_via = located .found_via ,
399+ ctk_companion_tags = SUPPORTED_BITCODE_LIBS_CTK_COMPANION_TAGS .get (located .name , ()),
384400 )
385401
386402
@@ -392,6 +408,7 @@ def _resolve_binary_item(utility_name: str, abs_path: str) -> ResolvedItem:
392408 packaged_with = packaged_with ,
393409 abs_path = abs_path ,
394410 found_via = None ,
411+ ctk_companion_tags = SUPPORTED_BINARIES_CTK_COMPANION_TAGS .get (utility_name , ()),
395412 )
396413
397414
0 commit comments