gpustack-runtime 0.2.8__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. gpustack_runtime-0.2.9/.opencodereview/rule.json +63 -0
  2. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/PKG-INFO +1 -1
  3. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/_version.py +2 -2
  4. gpustack_runtime-0.2.9/gpustack_runtime/_version_appendix.py +1 -0
  5. gpustack_runtime-0.2.9/gpustack_runtime/deployer/__hostfs__.py +386 -0
  6. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/__types__.py +54 -0
  7. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/ascend.py +187 -34
  8. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/docker.py +72 -5
  9. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/kubernetes.py +88 -22
  10. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/podman.py +11 -5
  11. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/envs.py +12 -0
  12. gpustack_runtime-0.2.9/tests/gpustack_runtime/deployer/test_ascend_a5_host_mounts.py +498 -0
  13. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +120 -20
  14. gpustack_runtime-0.2.9/tests/gpustack_runtime/deployer/test_hostfs.py +146 -0
  15. gpustack_runtime-0.2.9/tests/gpustack_runtime/deployer/test_kubernetes_pod_annotations.py +76 -0
  16. gpustack_runtime-0.2.9/tests/gpustack_runtime/deployer/test_kubernetes_pod_replacement.py +158 -0
  17. gpustack_runtime-0.2.9/tests/gpustack_runtime/deployer/test_privilege_escalation.py +46 -0
  18. gpustack_runtime-0.2.8/gpustack_runtime/_version_appendix.py +0 -1
  19. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.agents/skills/runtime-release/SKILL.md +0 -0
  20. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.codespelldict +0 -0
  21. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.codespellrc +0 -0
  22. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.dockerignore +0 -0
  23. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.gitattributes +0 -0
  24. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.gitignore +0 -0
  25. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.pre-commit-config.yaml +0 -0
  26. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/.python-version +0 -0
  27. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/ADOPTERS.md +0 -0
  28. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/AGENTS.md +0 -0
  29. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/DCO +0 -0
  30. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/LICENSE +0 -0
  31. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/Makefile +0 -0
  32. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/README.md +0 -0
  33. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/deploy/manifests/docker-compose.yaml +0 -0
  34. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/deploy/manifests/kubernetes.yaml +0 -0
  35. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/docs/index.md +0 -0
  36. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/docs/modules/gpustack_runtime.deployer.md +0 -0
  37. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/docs/modules/gpustack_runtime.detector.md +0 -0
  38. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/docs/modules/gpustack_runtime.md +0 -0
  39. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/__init__.py +0 -0
  40. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/__main__.py +0 -0
  41. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/_version.pyi +0 -0
  42. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/cmds/__init__.py +0 -0
  43. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/cmds/__types__.py +0 -0
  44. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/cmds/deployer.py +0 -0
  45. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/cmds/detector.py +0 -0
  46. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/cmds/images.py +0 -0
  47. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/__init__.py +0 -0
  48. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/__patches__.py +0 -0
  49. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/__utils__.py +0 -0
  50. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
  51. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
  52. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
  53. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/amd.py +0 -0
  54. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
  55. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
  56. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/metax.py +0 -0
  57. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/cdi/thead.py +0 -0
  58. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
  59. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/__init__.py +0 -0
  60. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/__types__.py +0 -0
  61. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/__utils__.py +0 -0
  62. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/amd.py +0 -0
  63. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/ascend.py +0 -0
  64. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/cambricon.py +0 -0
  65. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/hygon.py +0 -0
  66. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/iluvatar.py +0 -0
  67. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/metax.py +0 -0
  68. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/mthreads.py +0 -0
  69. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/nvidia.py +0 -0
  70. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
  71. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
  72. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
  73. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
  74. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
  75. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
  76. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
  77. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
  78. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
  79. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
  80. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
  81. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
  82. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
  83. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
  84. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/detector/thead.py +0 -0
  85. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/gpustack_runtime/logging.py +0 -0
  86. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/hatch.toml +0 -0
  87. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/mkdocs.yml +0 -0
  88. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/pack/Dockerfile +0 -0
  89. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/pack/Dockerfile.dummy +0 -0
  90. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/pyproject.toml +0 -0
  91. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/pytest.ini +0 -0
  92. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/ruff.toml +0 -0
  93. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
  94. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/specs/2026-10-30-detector-health-alignment-and-identity-cache.md +0 -0
  95. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
  96. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
  97. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
  98. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
  99. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
  100. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
  101. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
  102. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
  103. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
  104. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
  105. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
  106. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_logs_options.py +0 -0
  107. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
  108. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
  109. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
  110. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
  111. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
  112. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
  113. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +0 -0
  114. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +0 -0
  115. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
  116. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/conftest.py +0 -0
  117. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
  118. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/README.md +0 -0
  119. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
  120. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
  121. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
  122. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
  123. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
  124. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
  125. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
  126. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
  127. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
  128. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
  129. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
  130. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
  131. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
  132. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
  133. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
  134. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
  135. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
  136. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
  137. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
  138. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
  139. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
  140. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
  141. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
  142. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
  143. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
  144. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
  145. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
  146. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
  147. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
  148. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
  149. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
  150. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
  151. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_amd.py +0 -0
  152. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_ascend.py +0 -0
  153. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
  154. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_detector_cache.py +0 -0
  155. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
  156. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_detector_types.py +0 -0
  157. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
  158. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
  159. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_iluvatar.py +0 -0
  160. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_metax.py +0 -0
  161. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
  162. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
  163. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_nvidia.py +0 -0
  164. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
  165. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
  166. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_samples.py +0 -0
  167. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/tests/gpustack_runtime/detector/test_thead.py +0 -0
  168. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/uv.lock +0 -0
  169. {gpustack_runtime-0.2.8 → gpustack_runtime-0.2.9}/uv.toml +0 -0
@@ -0,0 +1,63 @@
1
+ {
2
+ "include": [
3
+ "gpustack_runtime/**/*.py",
4
+ "deploy/**",
5
+ "pack/**",
6
+ "README.md",
7
+ "mkdocs.yml"
8
+ ],
9
+ "exclude": [
10
+ "gpustack_runtime/_version.py",
11
+ "gpustack_runtime/_version_appendix.py",
12
+ "gpustack_runtime/deployer/__patches__.py",
13
+ "gpustack_runtime/detector/py*/**",
14
+ "docs/**",
15
+ "site/**",
16
+ "dist/**",
17
+ "specs/**",
18
+ "tests/**",
19
+ "**/__pycache__/**"
20
+ ],
21
+ "rules": [
22
+ {
23
+ "path": "gpustack_runtime/detector/**/*.py",
24
+ "merge_system_rule": true,
25
+ "rule": "Accelerator detectors, topology probing, and health checks. Every module must start with `from __future__ import annotations as __future_annotations__`. Detectors must degrade to an empty result and log at debug level on hosts without that vendor rather than raising. A new detector must be registered in gpustack_runtime/detector/__init__.py. Verify ctypes/vendor library calls and error handling against the matching py* binding (do not review py*/** internals, which are excluded). Flag shared mutable state or caching bugs, physical-vs-logical device index confusion, and missing or stale Google-style docstrings on public APIs. A behavior change or bug fix requires focused sample-based tests under tests/gpustack_runtime/detector/ that do not require real hardware. State this as a reminder only — tests/ is excluded from this review, so never claim a test is present or absent, and never infer absence from not having seen it."
26
+ },
27
+ {
28
+ "path": "gpustack_runtime/deployer/**/*.py",
29
+ "merge_system_rule": true,
30
+ "rule": "Container runtime deployers (Docker, Kubernetes, Podman), CDI generators, hostfs inspection, and mirrored deployment. Every module must start with `from __future__ import annotations as __future_annotations__`. Deployers must raise OperationError or UnsupportedError from gpustack_runtime/deployer/__types__.py rather than leaking runtime-client exceptions through the public API. A new deployer must be registered in gpustack_runtime/deployer/__init__.py. Treat host-path binds, hostfs symlink resolution, privileged/capability escalation, secret or sensitive environment variable logging, and mirrored deployment exclusions (never mirroring docker.sock, podman.sock, or the configured host root such as /host) as security-sensitive. Flag duplicate mount targets, partial-failure resource leaks, and unsafe shared state. A behavior change or bug fix requires focused mocked-client tests under tests/gpustack_runtime/deployer/ without requiring a live container runtime. State this as a reminder only — tests/ is excluded from this review, so never claim a test is present or absent, and never infer absence from not having seen it."
31
+ },
32
+ {
33
+ "path": "gpustack_runtime/cmds/**/*.py",
34
+ "merge_system_rule": true,
35
+ "rule": "CLI subcommands under the gpustack-runtime entrypoint. Every module must start with `from __future__ import annotations as __future_annotations__`. Flag unhandled runtime exceptions leaking raw tracebacks where explicit error messages and exit codes are expected, unsafe argument handling, or breaking changes to CLI flags and structured output formats."
36
+ },
37
+ {
38
+ "path": "gpustack_runtime/envs.py",
39
+ "merge_system_rule": true,
40
+ "rule": "Environment variable registry. Flag any mismatch in name, type, default value, or parsing semantics between the TYPE_CHECKING declarations and the runtime variables mapping. Require Google-style docstrings on new or changed variables since they render into the published API reference."
41
+ },
42
+ {
43
+ "path": "deploy/**",
44
+ "merge_system_rule": true,
45
+ "rule": "Deployment manifests. Flag invalid resource names, selectors, probes, RBAC permissions, overly broad privileges or host mounts, secrets exposed in plain text, or configuration that diverges from gpustack_runtime."
46
+ },
47
+ {
48
+ "path": "pack/**",
49
+ "merge_system_rule": true,
50
+ "rule": "Container image build definitions and scripts. Flag leaked build secrets or tokens, broken multi-arch build assumptions, unsafe shell scripting, or mismatches with pyproject.toml and runtime entrypoints."
51
+ },
52
+ {
53
+ "path": "README.md",
54
+ "merge_system_rule": true,
55
+ "rule": "Canonical repository README. Flag credentials or other secrets in examples, and documentation that contradicts the CLI, environment variables, or shipped library behavior."
56
+ },
57
+ {
58
+ "path": "mkdocs.yml",
59
+ "merge_system_rule": true,
60
+ "rule": "MkDocs configuration. Pages omitted from nav are still built and published, but are excluded from global navigation and previous/next links; check whether a new page under docs/ is intended to be discoverable in nav rather than claiming it is unpublished. Flag navigation entries that point to a missing page or conflict with the documentation structure."
61
+ }
62
+ ]
63
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gpustack-runtime
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: GPUStack Runtime is library for detecting GPU resources and launching GPU workloads.
5
5
  Project-URL: Homepage, https://github.com/gpustack/runtime
6
6
  Project-URL: Bug Tracker, https://github.com/gpustack/gpustack/issues
@@ -27,8 +27,8 @@ version_tuple: VERSION_TUPLE
27
27
  __commit_id__: COMMIT_ID
28
28
  commit_id: COMMIT_ID
29
29
 
30
- __version__ = version = '0.2.8'
31
- __version_tuple__ = version_tuple = (0, 2, 8)
30
+ __version__ = version = '0.2.9'
31
+ __version_tuple__ = version_tuple = (0, 2, 9)
32
32
  try:
33
33
  from ._version_appendix import git_commit
34
34
  __commit_id__ = commit_id = git_commit
@@ -0,0 +1 @@
1
+ git_commit = "40cea8d"
@@ -0,0 +1,386 @@
1
+ from __future__ import annotations as __future_annotations__
2
+
3
+ import errno
4
+ import os
5
+ import posixpath
6
+ import stat
7
+ from typing import Self
8
+
9
+ from .. import envs
10
+
11
+ DEFAULT_HOST_ROOT = "/host"
12
+ """
13
+ Default container mount path where the host root filesystem is mounted read-only.
14
+ """
15
+
16
+ _MAX_SYMLINK_HOPS = 40
17
+ """
18
+ Maximum number of symbolic link expansions allowed per host-path resolution.
19
+ """
20
+
21
+ _HOST_ROOT_MARKERS = ("etc", "proc", "usr")
22
+ """
23
+ Top-level directories required inside a valid Linux host root filesystem.
24
+ """
25
+
26
+ _READ_CHUNK_SIZE = 65536
27
+
28
+
29
+ def normalize_mount_path(path: str | None) -> str:
30
+ """
31
+ Normalize a POSIX container mount target path for equality comparisons.
32
+
33
+ Args:
34
+ path:
35
+ The mount path to normalize.
36
+
37
+ Returns:
38
+ The normalized POSIX path, or an empty string if path is empty.
39
+
40
+ """
41
+ if not path:
42
+ return ""
43
+ normalized = posixpath.normpath(path)
44
+ if normalized.startswith("//"):
45
+ normalized = "/" + normalized.lstrip("/")
46
+ return normalized
47
+
48
+
49
+ def is_host_root_mount_path(
50
+ path: str | None,
51
+ host_root: str | None = None,
52
+ ) -> bool:
53
+ """
54
+ Report whether a container mount destination matches the configured host root.
55
+
56
+ Args:
57
+ path:
58
+ The container mount destination to check.
59
+ host_root:
60
+ Optional host-root mount path override. Defaults to
61
+ ``envs.GPUSTACK_RUNTIME_DEPLOY_HOST_ROOT``.
62
+
63
+ Returns:
64
+ True if the destination matches the configured host root.
65
+
66
+ """
67
+ if host_root is None:
68
+ host_root = envs.GPUSTACK_RUNTIME_DEPLOY_HOST_ROOT
69
+ normalized_host_root = normalize_mount_path(host_root)
70
+ if not normalized_host_root or normalized_host_root == "/":
71
+ return False
72
+ return normalize_mount_path(path) == normalized_host_root
73
+
74
+
75
+ def normalize_host_path(host_path: str) -> list[str]:
76
+ """
77
+ Validate and split a native host path without folding ``..`` segments.
78
+
79
+ Args:
80
+ host_path:
81
+ The native host path (e.g., ``/etc/hccl_rootinfo.json``).
82
+
83
+ Returns:
84
+ A list of clean path segments, or an empty list for ``/``.
85
+
86
+ Raises:
87
+ ValueError:
88
+ If host_path is empty, contains a NUL byte, or contains a ``..`` segment.
89
+
90
+ """
91
+ if not host_path:
92
+ msg = "Host path must not be empty"
93
+ raise ValueError(msg)
94
+ if "\x00" in host_path:
95
+ msg = f"Host path {host_path!r} contains NUL byte"
96
+ raise ValueError(msg)
97
+
98
+ clean_parts: list[str] = []
99
+ for part in host_path.split("/"):
100
+ if part in ("", "."):
101
+ continue
102
+ if part == "..":
103
+ msg = f"Host path {host_path!r} must not contain '..' segment"
104
+ raise ValueError(msg)
105
+ clean_parts.append(part)
106
+ return clean_parts
107
+
108
+
109
+ class ReadOnlyHostFS:
110
+ """
111
+ Strictly read-only inspector for a host root filesystem mounted at a prefix.
112
+
113
+ Callers pass native host paths (such as ``/etc/hccl_rootinfo.json`` or
114
+ ``/lib/route.conf``) without prepending the mount prefix. Every lookup is
115
+ confined inside the opened root directory descriptor, resolving intermediate
116
+ relative and absolute symbolic links within that root boundary.
117
+ """
118
+
119
+ def __init__(self, root_fd: int, root_path: str):
120
+ self._root_fd: int | None = root_fd
121
+ self._root_path = root_path
122
+
123
+ def __enter__(self) -> Self:
124
+ return self
125
+
126
+ def __exit__(self, exc_type, exc_value, traceback) -> None:
127
+ self.close()
128
+
129
+ def close(self) -> None:
130
+ """
131
+ Release the underlying host root directory descriptor.
132
+ """
133
+ if self._root_fd is not None:
134
+ fd = self._root_fd
135
+ self._root_fd = None
136
+ os.close(fd)
137
+
138
+ def _require_root_fd(self) -> int:
139
+ if self._root_fd is None:
140
+ msg = f"Host root {self._root_path!r} is closed"
141
+ raise ValueError(msg)
142
+ return self._root_fd
143
+
144
+ def _resolve(
145
+ self,
146
+ host_path: str,
147
+ *,
148
+ follow_leaf: bool,
149
+ ) -> tuple[int, str | None, bool]:
150
+ """
151
+ Walk host_path component-by-component inside the host root.
152
+
153
+ Returns:
154
+ A tuple ``(parent_fd, leaf_name, close_parent)``. When
155
+ ``close_parent`` is True, the caller must close ``parent_fd``.
156
+ ``leaf_name`` is None when host_path resolves to the root itself.
157
+
158
+ """
159
+ root_fd = self._require_root_fd()
160
+ segments = normalize_host_path(host_path)
161
+ if not segments:
162
+ return root_fd, None, False
163
+
164
+ stack: list[int] = [root_fd]
165
+ queue = list(segments)
166
+ hops = 0
167
+
168
+ try:
169
+ while queue:
170
+ seg = queue.pop(0)
171
+ if seg in ("", "."):
172
+ continue
173
+ if seg == "..":
174
+ if len(stack) == 1:
175
+ msg = f"Symlink target in {host_path!r} escapes host root"
176
+ raise PermissionError(msg)
177
+ os.close(stack.pop())
178
+ continue
179
+
180
+ is_leaf = len(queue) == 0
181
+ if is_leaf and not follow_leaf:
182
+ close_parent = len(stack) > 1
183
+ parent_fd = stack.pop() if close_parent else root_fd
184
+ return parent_fd, seg, close_parent
185
+
186
+ cur_fd = stack[-1]
187
+ st = os.lstat(seg, dir_fd=cur_fd)
188
+
189
+ if stat.S_ISLNK(st.st_mode):
190
+ hops += 1
191
+ if hops > _MAX_SYMLINK_HOPS:
192
+ raise OSError(
193
+ errno.ELOOP,
194
+ f"Exceeded {_MAX_SYMLINK_HOPS} symlink hops while resolving {host_path!r}",
195
+ )
196
+ target = os.readlink(seg, dir_fd=cur_fd)
197
+ if not target or "\x00" in target:
198
+ msg = f"Invalid symlink target {target!r} while resolving {host_path!r}"
199
+ raise ValueError(msg)
200
+ if target.startswith("/"):
201
+ while len(stack) > 1:
202
+ os.close(stack.pop())
203
+ target_parts = [p for p in target.split("/") if p not in ("", ".")]
204
+ queue = target_parts + queue
205
+ continue
206
+
207
+ if is_leaf:
208
+ close_parent = len(stack) > 1
209
+ parent_fd = stack.pop() if close_parent else root_fd
210
+ return parent_fd, seg, close_parent
211
+
212
+ if not stat.S_ISDIR(st.st_mode):
213
+ raise NotADirectoryError(
214
+ errno.ENOTDIR,
215
+ "Not a directory",
216
+ host_path,
217
+ )
218
+
219
+ next_fd = os.open(
220
+ seg,
221
+ os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW,
222
+ dir_fd=cur_fd,
223
+ )
224
+ stack.append(next_fd)
225
+
226
+ close_parent = len(stack) > 1
227
+ parent_fd = stack.pop() if close_parent else root_fd
228
+ return parent_fd, None, close_parent
229
+ finally:
230
+ for fd in reversed(stack[1:]):
231
+ os.close(fd)
232
+
233
+ def stat(self, host_path: str) -> os.stat_result:
234
+ """
235
+ Stat host_path inside the host root, following symlinks inside the root.
236
+ """
237
+ parent_fd, leaf_name, close_parent = self._resolve(host_path, follow_leaf=True)
238
+ try:
239
+ if leaf_name is None:
240
+ return os.fstat(parent_fd)
241
+ return os.lstat(leaf_name, dir_fd=parent_fd)
242
+ finally:
243
+ if close_parent:
244
+ os.close(parent_fd)
245
+
246
+ def lstat(self, host_path: str) -> os.stat_result:
247
+ """
248
+ Lstat host_path inside the host root without following the leaf component.
249
+
250
+ Intermediate directory symlinks (such as merged-usr ``/lib -> /usr/lib``)
251
+ are resolved inside the host root.
252
+ """
253
+ parent_fd, leaf_name, close_parent = self._resolve(host_path, follow_leaf=False)
254
+ try:
255
+ if leaf_name is None:
256
+ return os.fstat(parent_fd)
257
+ return os.lstat(leaf_name, dir_fd=parent_fd)
258
+ finally:
259
+ if close_parent:
260
+ os.close(parent_fd)
261
+
262
+ def read_regular_file(self, host_path: str, max_bytes: int) -> bytes:
263
+ """
264
+ Read up to max_bytes from a regular non-symlink file at host_path.
265
+
266
+ Intermediate directory symlinks are resolved inside the host root, while
267
+ a symbolic link, directory, FIFO, device, or file exceeding max_bytes at
268
+ the leaf is rejected.
269
+
270
+ Args:
271
+ host_path:
272
+ The native host file path.
273
+ max_bytes:
274
+ Maximum allowed file size in bytes.
275
+
276
+ Returns:
277
+ The raw bytes of the file.
278
+
279
+ Raises:
280
+ OSError:
281
+ If the path cannot be inspected, is not a regular file, changes
282
+ identity while opening, or cannot be read.
283
+ ValueError:
284
+ If max_bytes is non-positive, the path is invalid, or the file
285
+ exceeds max_bytes.
286
+
287
+ """
288
+ if max_bytes <= 0:
289
+ msg = f"max_bytes must be positive, got {max_bytes}"
290
+ raise ValueError(msg)
291
+
292
+ parent_fd, leaf_name, close_parent = self._resolve(host_path, follow_leaf=False)
293
+ try:
294
+ if leaf_name is None:
295
+ msg = f"{host_path!r} is not a regular file"
296
+ raise IsADirectoryError(errno.EISDIR, msg, host_path)
297
+
298
+ lstat_info = os.lstat(leaf_name, dir_fd=parent_fd)
299
+ if not stat.S_ISREG(lstat_info.st_mode):
300
+ msg = f"{host_path!r} is not a regular file"
301
+ raise OSError(errno.EINVAL, msg, host_path)
302
+ if lstat_info.st_size > max_bytes:
303
+ msg = (
304
+ f"{host_path!r} size {lstat_info.st_size} exceeds limit {max_bytes}"
305
+ )
306
+ raise ValueError(msg)
307
+
308
+ open_flags = os.O_RDONLY | os.O_NOFOLLOW | getattr(os, "O_NONBLOCK", 0)
309
+ file_fd = os.open(leaf_name, open_flags, dir_fd=parent_fd)
310
+ try:
311
+ fstat_info = os.fstat(file_fd)
312
+ if not stat.S_ISREG(fstat_info.st_mode):
313
+ msg = f"Opened {host_path!r} is not a regular file"
314
+ raise OSError(errno.EINVAL, msg, host_path)
315
+ if not os.path.samestat(lstat_info, fstat_info):
316
+ msg = f"File identity changed while opening {host_path!r}"
317
+ raise OSError(errno.EIO, msg, host_path)
318
+ if fstat_info.st_size > max_bytes:
319
+ msg = f"{host_path!r} size {fstat_info.st_size} exceeds limit {max_bytes}"
320
+ raise ValueError(msg)
321
+
322
+ chunks: list[bytes] = []
323
+ total = 0
324
+ limit = max_bytes + 1
325
+ while total < limit:
326
+ chunk = os.read(file_fd, min(_READ_CHUNK_SIZE, limit - total))
327
+ if not chunk:
328
+ break
329
+ chunks.append(chunk)
330
+ total += len(chunk)
331
+
332
+ if total > max_bytes:
333
+ msg = f"{host_path!r} grew beyond limit {max_bytes} during read"
334
+ raise ValueError(msg)
335
+
336
+ return b"".join(chunks)
337
+ finally:
338
+ os.close(file_fd)
339
+ finally:
340
+ if close_parent:
341
+ os.close(parent_fd)
342
+
343
+
344
+ def _validate_host_root_markers(hfs: ReadOnlyHostFS, root_path: str) -> None:
345
+ for marker in _HOST_ROOT_MARKERS:
346
+ st = hfs.stat(f"/{marker}")
347
+ if not stat.S_ISDIR(st.st_mode):
348
+ msg = f"Host root {root_path!r} marker {marker!r} is not a directory"
349
+ raise NotADirectoryError(errno.ENOTDIR, msg, marker)
350
+
351
+
352
+ def open_host_root(root_path: str | None = None) -> ReadOnlyHostFS:
353
+ """
354
+ Open a host root filesystem and verify that ``etc``, ``proc``, and ``usr``
355
+ exist inside it as directories.
356
+
357
+ Args:
358
+ root_path:
359
+ The container path where the host root is mounted. Defaults to
360
+ ``envs.GPUSTACK_RUNTIME_DEPLOY_HOST_ROOT``.
361
+
362
+ Returns:
363
+ An open ReadOnlyHostFS instance.
364
+
365
+ Raises:
366
+ ValueError:
367
+ If root_path is empty or a required marker is not a directory.
368
+ OSError:
369
+ If root_path or a required marker cannot be opened or stated.
370
+
371
+ """
372
+ if root_path is None:
373
+ root_path = envs.GPUSTACK_RUNTIME_DEPLOY_HOST_ROOT
374
+ if not root_path:
375
+ msg = "Host root path must not be empty"
376
+ raise ValueError(msg)
377
+
378
+ root_fd = os.open(root_path, os.O_RDONLY | os.O_DIRECTORY)
379
+ hfs = ReadOnlyHostFS(root_fd, root_path)
380
+ try:
381
+ _validate_host_root_markers(hfs, root_path)
382
+ except Exception:
383
+ hfs.close()
384
+ raise
385
+
386
+ return hfs
@@ -851,6 +851,8 @@ class WorkloadPlan(WorkloadSecurity):
851
851
  Name for the workload, it should be unique in the deployer.
852
852
  labels (dict[str, str] | None):
853
853
  Labels for the workload.
854
+ annotations (dict[str, str] | None):
855
+ Annotations for the workload, applied by deployers that support them.
854
856
  instance_type (str | None):
855
857
  Name of the operator InstanceType the workload deploys onto.
856
858
  host_network (bool):
@@ -890,6 +892,12 @@ class WorkloadPlan(WorkloadSecurity):
890
892
  """
891
893
  Labels for the workload.
892
894
  """
895
+ annotations: dict[str, str] | None = None
896
+ """
897
+ Annotations for the workload.
898
+ Only the Kubernetes deployer applies them, onto the Pod, e.g. to
899
+ hint the operator's device plugin which accelerators to allocate.
900
+ """
893
901
  instance_type: str | None = None
894
902
  """
895
903
  Name of the operator InstanceType the workload deploys onto.
@@ -1491,6 +1499,12 @@ class DevicesMaterial:
1491
1499
  the value is the CPU cores string.
1492
1500
  For example, {"0": "0-7"}.
1493
1501
  """
1502
+ arch_families: dict[str, str] = field(default_factory=dict)
1503
+ """
1504
+ Mapping devices to architecture family names,
1505
+ the key is the device index string,
1506
+ the value is the architecture family string (e.g., "Ascend950PR").
1507
+ """
1494
1508
 
1495
1509
 
1496
1510
  UNKNOWN_RUNTIME_ENV = "UNKNOWN_RUNTIME_VISIBLE_DEVICES"
@@ -1622,6 +1636,7 @@ class Deployer(ABC):
1622
1636
  dev_backend_aligned_values: dict[str, str] = {}
1623
1637
  dev_numa_affinities: dict[str, str] = {}
1624
1638
  dev_cpus_affinities: dict[str, str] = {}
1639
+ dev_arch_families: dict[str, str] = {}
1625
1640
  for dev_i, dev in enumerate(devs):
1626
1641
  dev_index = str(dev.index)
1627
1642
  dev_appendix = dev.appendix or {}
@@ -1645,6 +1660,9 @@ class Deployer(ABC):
1645
1660
  dev_cpus_affinities[dev_index] = map_numa_node_to_cpu_affinity(
1646
1661
  dev_numa_affinities[dev_index],
1647
1662
  )
1663
+ dev_arch_families[dev_index] = str(
1664
+ dev_appendix.get("arch_family", ""),
1665
+ )
1648
1666
 
1649
1667
  materials[ren] = DevicesMaterial(
1650
1668
  manufacturer=manu,
@@ -1665,6 +1683,7 @@ class Deployer(ABC):
1665
1683
  },
1666
1684
  numa_affinities=dev_numa_affinities,
1667
1685
  cpus_affinities=dev_cpus_affinities,
1686
+ arch_families=dev_arch_families,
1668
1687
  )
1669
1688
 
1670
1689
  return materials
@@ -1709,6 +1728,41 @@ class Deployer(ABC):
1709
1728
 
1710
1729
  return m[runtime_env].manufacturer
1711
1730
 
1731
+ def get_device_arch_families(
1732
+ self,
1733
+ runtime_env: str,
1734
+ resource_values: list[str] | None = None,
1735
+ *,
1736
+ all_devices: bool = False,
1737
+ ) -> list[str]:
1738
+ """
1739
+ Return the architecture family names for requested devices of a runtime env.
1740
+
1741
+ Args:
1742
+ runtime_env:
1743
+ The runtime visible devices environment variable name.
1744
+ resource_values:
1745
+ The requested device index strings.
1746
+ all_devices:
1747
+ When True, return architecture families for all detected devices
1748
+ under runtime_env.
1749
+
1750
+ Returns:
1751
+ A list of non-empty architecture family names.
1752
+
1753
+ """
1754
+ m = self._get_materials()
1755
+ if runtime_env not in m:
1756
+ return []
1757
+
1758
+ rm = m[runtime_env]
1759
+ if all_devices or not resource_values or resource_values == ["all"]:
1760
+ return [f for f in rm.arch_families.values() if f]
1761
+
1762
+ return [
1763
+ family for v in resource_values if (family := rm.arch_families.get(v, ""))
1764
+ ]
1765
+
1712
1766
  def get_runtime_envs(
1713
1767
  self,
1714
1768
  ) -> list[str]: