gpustack-runtime 0.2.9__tar.gz → 0.2.9.post2__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 → gpustack_runtime-0.2.9.post2}/PKG-INFO +1 -1
  2. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/_version.py +2 -2
  3. gpustack_runtime-0.2.9.post2/gpustack_runtime/_version_appendix.py +1 -0
  4. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/__types__.py +6 -1
  5. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/nvidia.py +88 -19
  6. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/envs.py +1 -1
  7. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_nvidia.py +159 -1
  8. gpustack_runtime-0.2.9/gpustack_runtime/_version_appendix.py +0 -1
  9. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.agents/skills/runtime-release/SKILL.md +0 -0
  10. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.codespelldict +0 -0
  11. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.codespellrc +0 -0
  12. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.dockerignore +0 -0
  13. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.gitattributes +0 -0
  14. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.gitignore +0 -0
  15. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.opencodereview/rule.json +0 -0
  16. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.pre-commit-config.yaml +0 -0
  17. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/.python-version +0 -0
  18. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/ADOPTERS.md +0 -0
  19. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/AGENTS.md +0 -0
  20. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/DCO +0 -0
  21. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/LICENSE +0 -0
  22. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/Makefile +0 -0
  23. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/README.md +0 -0
  24. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/deploy/manifests/docker-compose.yaml +0 -0
  25. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/deploy/manifests/kubernetes.yaml +0 -0
  26. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/docs/index.md +0 -0
  27. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/docs/modules/gpustack_runtime.deployer.md +0 -0
  28. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/docs/modules/gpustack_runtime.detector.md +0 -0
  29. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/docs/modules/gpustack_runtime.md +0 -0
  30. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/__init__.py +0 -0
  31. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/__main__.py +0 -0
  32. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/_version.pyi +0 -0
  33. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/cmds/__init__.py +0 -0
  34. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/cmds/__types__.py +0 -0
  35. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/cmds/deployer.py +0 -0
  36. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/cmds/detector.py +0 -0
  37. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/cmds/images.py +0 -0
  38. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/__hostfs__.py +0 -0
  39. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/__init__.py +0 -0
  40. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/__patches__.py +0 -0
  41. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/__types__.py +0 -0
  42. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/__utils__.py +0 -0
  43. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
  44. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
  45. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
  46. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/amd.py +0 -0
  47. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/ascend.py +0 -0
  48. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
  49. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
  50. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/metax.py +0 -0
  51. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/cdi/thead.py +0 -0
  52. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/docker.py +0 -0
  53. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
  54. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/kubernetes.py +0 -0
  55. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/deployer/podman.py +0 -0
  56. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/__init__.py +0 -0
  57. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/__utils__.py +0 -0
  58. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/amd.py +0 -0
  59. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/ascend.py +0 -0
  60. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/cambricon.py +0 -0
  61. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/hygon.py +0 -0
  62. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/iluvatar.py +0 -0
  63. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/metax.py +0 -0
  64. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/mthreads.py +0 -0
  65. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
  66. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
  67. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
  68. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
  69. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
  70. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
  71. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
  72. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
  73. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
  74. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
  75. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
  76. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
  77. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
  78. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
  79. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/detector/thead.py +0 -0
  80. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/gpustack_runtime/logging.py +0 -0
  81. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/hatch.toml +0 -0
  82. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/mkdocs.yml +0 -0
  83. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/pack/Dockerfile +0 -0
  84. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/pack/Dockerfile.dummy +0 -0
  85. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/pyproject.toml +0 -0
  86. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/pytest.ini +0 -0
  87. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/ruff.toml +0 -0
  88. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
  89. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/specs/2026-10-30-detector-health-alignment-and-identity-cache.md +0 -0
  90. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
  91. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
  92. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
  93. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
  94. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
  95. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
  96. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
  97. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
  98. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
  99. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_ascend_a5_host_mounts.py +0 -0
  100. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +0 -0
  101. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
  102. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_hostfs.py +0 -0
  103. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_kubernetes_pod_annotations.py +0 -0
  104. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_kubernetes_pod_replacement.py +0 -0
  105. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
  106. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_logs_options.py +0 -0
  107. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
  108. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_privilege_escalation.py +0 -0
  109. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
  110. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
  111. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
  112. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
  113. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
  114. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +0 -0
  115. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +0 -0
  116. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
  117. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/conftest.py +0 -0
  118. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
  119. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/README.md +0 -0
  120. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
  121. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
  122. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
  123. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
  124. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
  125. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
  126. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
  127. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
  128. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
  129. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
  130. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
  131. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
  132. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
  133. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
  134. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
  135. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
  136. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
  137. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
  138. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
  139. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
  140. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
  141. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
  142. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
  143. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
  144. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
  145. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
  146. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
  147. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
  148. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
  149. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
  150. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
  151. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
  152. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_amd.py +0 -0
  153. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_ascend.py +0 -0
  154. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
  155. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_detector_cache.py +0 -0
  156. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
  157. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_detector_types.py +0 -0
  158. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
  159. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
  160. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_iluvatar.py +0 -0
  161. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_metax.py +0 -0
  162. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
  163. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
  164. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
  165. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
  166. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_samples.py +0 -0
  167. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/tests/gpustack_runtime/detector/test_thead.py +0 -0
  168. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/uv.lock +0 -0
  169. {gpustack_runtime-0.2.9 → gpustack_runtime-0.2.9.post2}/uv.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gpustack-runtime
3
- Version: 0.2.9
3
+ Version: 0.2.9.post2
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.9'
31
- __version_tuple__ = version_tuple = (0, 2, 9)
30
+ __version__ = version = '0.2.9.post2'
31
+ __version_tuple__ = version_tuple = (0, 2, 9, 'post2')
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 = "6b740ce"
@@ -480,6 +480,7 @@ def index_mig_devices(
480
480
  devices: Devices,
481
481
  mig_devices: dict[int, list[dict]],
482
482
  slots: int,
483
+ reserved: int = 0,
483
484
  ) -> None:
484
485
  """
485
486
  Number the given cards' MIG devices in place.
@@ -503,9 +504,13 @@ def index_mig_devices(
503
504
  found at, which the block offset is added to.
504
505
  slots:
505
506
  The number of MIG devices a card can host, i.e. the block size.
507
+ reserved:
508
+ The number of card indexes taken even if no detected card reports
509
+ them, e.g. by a card the detector skipped, so that skipping the
510
+ card with the largest index does not renumber the MIG devices.
506
511
 
507
512
  """
508
- base = max((dev.index for dev in devices), default=-1) + 1
513
+ base = max(max((dev.index for dev in devices), default=-1) + 1, reserved)
509
514
  for dev_idx, migs in mig_devices.items():
510
515
  for mig in migs:
511
516
  mig["index"] += base + dev_idx * slots
@@ -98,6 +98,7 @@ class NVIDIADetector(Detector):
98
98
  return None
99
99
 
100
100
  ret: Devices = []
101
+ unqueryable_error: pynvml.NVMLError | None = None
101
102
 
102
103
  try:
103
104
  pynvml.nvmlInit()
@@ -128,19 +129,36 @@ class NVIDIADetector(Detector):
128
129
 
129
130
  dev_count = pynvml.nvmlDeviceGetCount()
130
131
  for dev_idx in range(dev_count):
131
- dev = pynvml.nvmlDeviceGetHandleByIndex(dev_idx)
132
+ # Every other query of a card below degrades on its own; these
133
+ # do not. A card that cannot answer them, for example one that
134
+ # has fallen off the bus, is skipped instead of failing the
135
+ # detection of every other card.
136
+ try:
137
+ dev = pynvml.nvmlDeviceGetHandleByIndex(dev_idx)
138
+ dev_cc_t = pynvml.nvmlDeviceGetCudaComputeCapability(dev)
139
+ # Unversioned on purpose, unlike the memory query above: pynvml
140
+ # exposes no v2 PCI accessor to prefer or fall back to --
141
+ # `nvmlDeviceGetPciInfo` is its alias of `nvmlDeviceGetPciInfo_v3`,
142
+ # a superset of the v2 structure the operator's `GetPciInfoV`
143
+ # prefers, and `nvmlPciInfo_v2_t` is declared but unused. The
144
+ # operator never reads the structure's string either, its
145
+ # `GetBusId()` formatting the BDF from domain/bus/device.
146
+ dev_pci_info = pynvml.nvmlDeviceGetPciInfo(dev)
147
+ dev_name = pynvml.nvmlDeviceGetName(dev)
148
+ dev_uuid = pynvml.nvmlDeviceGetUUID(dev)
149
+ except pynvml.NVMLError as e:
150
+ if not _is_unqueryable_device_error(e):
151
+ raise
152
+ debug_log_warning(
153
+ logger,
154
+ "Failed to query device %d, skipping it: %s",
155
+ dev_idx,
156
+ e,
157
+ )
158
+ unqueryable_error = e
159
+ continue
132
160
 
133
- dev_cc_t = pynvml.nvmlDeviceGetCudaComputeCapability(dev)
134
161
  dev_cc = ".".join(map(str, dev_cc_t))
135
-
136
- # Unversioned on purpose, unlike the memory query above: pynvml
137
- # exposes no v2 PCI accessor to prefer or fall back to --
138
- # `nvmlDeviceGetPciInfo` is its alias of `nvmlDeviceGetPciInfo_v3`,
139
- # a superset of the v2 structure the operator's `GetPciInfoV`
140
- # prefers, and `nvmlPciInfo_v2_t` is declared but unused. The
141
- # operator never reads the structure's string either, its
142
- # `GetBusId()` formatting the BDF from domain/bus/device.
143
- dev_pci_info = pynvml.nvmlDeviceGetPciInfo(dev)
144
162
  dev_bdf = str(dev_pci_info.busIdLegacy).lower()
145
163
 
146
164
  dev_numa = get_numa_node_by_bdf(dev_bdf)
@@ -190,10 +208,6 @@ class NVIDIADetector(Detector):
190
208
  # in this inventory. A MIG-enabled card is marked ``mig``
191
209
  # in the appendix instead.
192
210
 
193
- dev_name = pynvml.nvmlDeviceGetName(dev)
194
-
195
- dev_uuid = pynvml.nvmlDeviceGetUUID(dev)
196
-
197
211
  dev_cores = None
198
212
  with contextlib.suppress(pynvml.NVMLError):
199
213
  dev_cores = pynvml.nvmlDeviceGetNumGpuCores(dev)
@@ -269,7 +283,15 @@ class NVIDIADetector(Detector):
269
283
  ),
270
284
  )
271
285
 
272
- index_mig_devices(ret, devs_mig_devices, devs_mig_slots)
286
+ # A skipped card's enumeration index stays taken. Minor numbers are
287
+ # not the enumeration range, so they get no reservation.
288
+ reserved = 0
289
+ if (
290
+ unqueryable_error
291
+ and not envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY
292
+ ):
293
+ reserved = dev_count
294
+ index_mig_devices(ret, devs_mig_devices, devs_mig_slots, reserved=reserved)
273
295
  except pynvml.NVMLError:
274
296
  debug_log_exception(logger, "Failed to fetch devices")
275
297
  raise
@@ -277,6 +299,11 @@ class NVIDIADetector(Detector):
277
299
  debug_log_exception(logger, "Failed to process devices fetching")
278
300
  raise
279
301
 
302
+ if not ret and unqueryable_error is not None:
303
+ # No card could be queried: fail as before, rather than report a
304
+ # host without cards.
305
+ raise unqueryable_error
306
+
280
307
  return ret
281
308
 
282
309
  def detect_usage(self, devices: Devices | None = None) -> Devices | None:
@@ -310,15 +337,29 @@ class NVIDIADetector(Detector):
310
337
  # metrics list is joined by device identity, never by index, as an index
311
338
  # is not stable across a re-detection.
312
339
  usages: Devices = []
340
+ unqueryable_error: pynvml.NVMLError | None = None
313
341
 
314
342
  try:
315
343
  pynvml.nvmlInit()
316
344
 
317
345
  dev_count = pynvml.nvmlDeviceGetCount()
318
346
  for dev_idx in range(dev_count):
319
- dev = pynvml.nvmlDeviceGetHandleByIndex(dev_idx)
320
-
321
- dev_uuid = pynvml.nvmlDeviceGetUUID(dev)
347
+ # As in detect_info: a card that cannot be queried is skipped,
348
+ # so the other cards keep their usage.
349
+ try:
350
+ dev = pynvml.nvmlDeviceGetHandleByIndex(dev_idx)
351
+ dev_uuid = pynvml.nvmlDeviceGetUUID(dev)
352
+ except pynvml.NVMLError as e:
353
+ if not _is_unqueryable_device_error(e):
354
+ raise
355
+ debug_log_warning(
356
+ logger,
357
+ "Failed to query device %d usage, skipping it: %s",
358
+ dev_idx,
359
+ e,
360
+ )
361
+ unqueryable_error = e
362
+ continue
322
363
 
323
364
  dev_cores_util = _get_sm_util_from_gpm_metrics(dev)
324
365
  if dev_cores_util is None:
@@ -391,6 +432,10 @@ class NVIDIADetector(Detector):
391
432
  debug_log_exception(logger, "Failed to process devices usage fetching")
392
433
  raise
393
434
 
435
+ if not usages and unqueryable_error is not None:
436
+ # As in detect_info: no card could be queried, so fail as before.
437
+ raise unqueryable_error
438
+
394
439
  return merge_devices_usage(devices, usages)
395
440
 
396
441
  def get_topology(self, devices: Devices | None = None) -> Topology | None:
@@ -491,6 +536,30 @@ class NVIDIADetector(Detector):
491
536
  return ret
492
537
 
493
538
 
539
+ def _is_unqueryable_device_error(e: pynvml.NVMLError) -> bool:
540
+ """
541
+ Whether an NVML error means the card itself cannot be queried: it has
542
+ fallen off the bus (NVML_ERROR_GPU_IS_LOST, often reported as
543
+ NVML_ERROR_UNKNOWN), needs a reset, lacks power, or has an interrupt
544
+ problem. Other errors concern the driver or the call, not one card.
545
+
546
+ Args:
547
+ e:
548
+ The NVML error to classify.
549
+
550
+ Returns:
551
+ True if the error is specific to the card being queried.
552
+
553
+ """
554
+ return getattr(e, "value", None) in (
555
+ pynvml.NVML_ERROR_GPU_IS_LOST,
556
+ pynvml.NVML_ERROR_UNKNOWN,
557
+ pynvml.NVML_ERROR_RESET_REQUIRED,
558
+ pynvml.NVML_ERROR_INSUFFICIENT_POWER,
559
+ pynvml.NVML_ERROR_IRQ_ISSUE,
560
+ )
561
+
562
+
494
563
  def _get_memory_info(
495
564
  dev: pynvml.c_nvmlDevice_t,
496
565
  ) -> tuple[int, int]:
@@ -616,7 +616,7 @@ variables: dict[str, Callable[[], Any]] = {
616
616
  "hygon.com/devices=HYGON_VISIBLE_DEVICES;"
617
617
  "iluvatar.ai/devices=IX_VISIBLE_DEVICES;"
618
618
  "metax-tech.com/devices=CUDA_VISIBLE_DEVICES;"
619
- "mthreads.com/devices=METHERDS_VISIBLE_DEVICES;"
619
+ "mthreads.com/devices=MTHREADS_VISIBLE_DEVICES;"
620
620
  "nvidia.com/devices=NVIDIA_VISIBLE_DEVICES;"
621
621
  "alibabacloud.com/devices=NVIDIA_VISIBLE_DEVICES;",
622
622
  ),
@@ -115,6 +115,15 @@ class _FakeDevice:
115
115
  verdict that names the aggregate counter cannot be satisfied by the
116
116
  volatile one.
117
117
  """
118
+ query_error_code: int | None = None
119
+ """
120
+ The error code the card's identity query raises, as a card that has fallen
121
+ off the bus does, or None for a card that answers.
122
+ """
123
+ query_error_at: str = "handle"
124
+ """
125
+ The identity query that raises query_error_code: "handle" or "name".
126
+ """
118
127
  ecc_counter_error_code: int | None = None
119
128
  """
120
129
  The error code the ECC counter query raises, or None for a readable one.
@@ -142,6 +151,15 @@ class _FakeDevice:
142
151
  """
143
152
 
144
153
 
154
+ def _raise_query_error(device: _FakeDevice, query: str):
155
+ """
156
+ Raise the card's query error, if it has one for this query.
157
+ """
158
+ if device.query_error_code is not None and device.query_error_at == query:
159
+ msg = f"device query failed at {query}"
160
+ raise _NVMLError(msg, device.query_error_code)
161
+
162
+
145
163
  class _FakeNVML:
146
164
  """
147
165
  A pynvml stand-in exposing only what the NVIDIA detector touches, recording
@@ -151,6 +169,11 @@ class _FakeNVML:
151
169
  NVMLError = _NVMLError
152
170
  NVML_SUCCESS = 0
153
171
  NVML_ERROR_NOT_SUPPORTED = 3
172
+ NVML_ERROR_NO_PERMISSION = 4
173
+ NVML_ERROR_INSUFFICIENT_POWER = 8
174
+ NVML_ERROR_IRQ_ISSUE = 11
175
+ NVML_ERROR_GPU_IS_LOST = 15
176
+ NVML_ERROR_RESET_REQUIRED = 16
154
177
  NVML_ERROR_UNKNOWN = 999
155
178
  NVML_VALUE_TYPE_DOUBLE = 0
156
179
  NVML_VALUE_TYPE_UNSIGNED_INT = 1
@@ -235,7 +258,9 @@ class _FakeNVML:
235
258
 
236
259
  def nvmlDeviceGetHandleByIndex(self, index): # noqa: N802
237
260
  self.calls.append("nvmlDeviceGetHandleByIndex")
238
- return self.devices[index]
261
+ device = self.devices[index]
262
+ _raise_query_error(device, "handle")
263
+ return device
239
264
 
240
265
  # Identity and capability.
241
266
 
@@ -245,6 +270,7 @@ class _FakeNVML:
245
270
 
246
271
  def nvmlDeviceGetName(self, handle): # noqa: N802
247
272
  self.calls.append("nvmlDeviceGetName")
273
+ _raise_query_error(handle, "name")
248
274
  return handle.name
249
275
 
250
276
  def nvmlDeviceGetCudaComputeCapability(self, handle): # noqa: N802
@@ -609,6 +635,109 @@ def test_detect_info_physical_index_priority_skips_unreadable_minor_number(
609
635
  ]
610
636
 
611
637
 
638
+ @pytest.mark.parametrize(
639
+ "error_code, query",
640
+ [
641
+ (_FakeNVML.NVML_ERROR_GPU_IS_LOST, "handle"),
642
+ (_FakeNVML.NVML_ERROR_UNKNOWN, "handle"),
643
+ (_FakeNVML.NVML_ERROR_RESET_REQUIRED, "handle"),
644
+ (_FakeNVML.NVML_ERROR_INSUFFICIENT_POWER, "handle"),
645
+ (_FakeNVML.NVML_ERROR_IRQ_ISSUE, "handle"),
646
+ (_FakeNVML.NVML_ERROR_GPU_IS_LOST, "name"),
647
+ ],
648
+ )
649
+ def test_detect_info_skips_a_card_that_cannot_be_queried(fake_nvml, error_code, query):
650
+ fake_nvml(
651
+ [
652
+ _FakeDevice(uuid="GPU-0"),
653
+ _FakeDevice(
654
+ uuid="GPU-1",
655
+ query_error_code=error_code,
656
+ query_error_at=query,
657
+ ),
658
+ _FakeDevice(uuid="GPU-2"),
659
+ ],
660
+ )
661
+
662
+ devices = NVIDIADetector().detect_info()
663
+
664
+ assert [(dev.uuid, dev.index) for dev in devices] == [("GPU-0", 0), ("GPU-2", 2)]
665
+
666
+
667
+ def test_detect_info_fails_on_another_query_error(fake_nvml):
668
+ fake_nvml(
669
+ [
670
+ _FakeDevice(uuid="GPU-0"),
671
+ _FakeDevice(
672
+ uuid="GPU-1",
673
+ query_error_code=_FakeNVML.NVML_ERROR_NO_PERMISSION,
674
+ ),
675
+ ],
676
+ )
677
+
678
+ with pytest.raises(_NVMLError):
679
+ NVIDIADetector().detect_info()
680
+
681
+
682
+ def test_detect_info_fails_when_no_card_can_be_queried(fake_nvml):
683
+ fake_nvml(
684
+ [_FakeDevice(query_error_code=_FakeNVML.NVML_ERROR_GPU_IS_LOST)],
685
+ )
686
+
687
+ with pytest.raises(_NVMLError):
688
+ NVIDIADetector().detect_info()
689
+
690
+
691
+ def test_detect_info_keeps_mig_indexes_when_the_last_card_cannot_be_queried(
692
+ fake_nvml,
693
+ ):
694
+ # MIG indexes are numbered above the cards' indexes. Skipping the card with
695
+ # the largest index must not renumber the MIG devices of the other cards.
696
+ def mig_indexes(lost: bool) -> list[int]:
697
+ error = {"query_error_code": _FakeNVML.NVML_ERROR_GPU_IS_LOST} if lost else {}
698
+ fake_nvml(
699
+ [
700
+ _mig_card(),
701
+ _FakeDevice(uuid="GPU-1"),
702
+ _FakeDevice(uuid="GPU-2", **error),
703
+ ],
704
+ )
705
+ devices = NVIDIADetector().detect_info()
706
+ return [mig["index"] for mig in devices[0].appendix["mig_devices"]]
707
+
708
+ assert mig_indexes(lost=False) == [3, 4]
709
+ assert mig_indexes(lost=True) == [3, 4]
710
+
711
+
712
+ def test_detect_info_keeps_physical_mig_indexes_when_a_card_cannot_be_queried(
713
+ fake_nvml,
714
+ monkeypatch,
715
+ ):
716
+ # With minor numbers as indexes, the card count is not the index namespace:
717
+ # a card without a readable minor number is already left out.
718
+ monkeypatch.setattr(
719
+ nvidia.envs,
720
+ "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
721
+ True,
722
+ raising=False,
723
+ )
724
+
725
+ def mig_indexes(lost: bool) -> list[int]:
726
+ error = {"query_error_code": _FakeNVML.NVML_ERROR_GPU_IS_LOST} if lost else {}
727
+ fake_nvml(
728
+ [
729
+ _FakeDevice(uuid="GPU-A", minor_number=0, **error),
730
+ _mig_card(minor_number=1),
731
+ _FakeDevice(uuid="GPU-C", minor_number=None),
732
+ ],
733
+ )
734
+ devices = NVIDIADetector().detect_info()
735
+ card = next(dev for dev in devices if dev.index == 1)
736
+ return [mig["index"] for mig in card.appendix["mig_devices"]]
737
+
738
+ assert mig_indexes(lost=True) == mig_indexes(lost=False)
739
+
740
+
612
741
  @pytest.mark.usefixtures("health_check")
613
742
  def test_detect_info_reports_the_memory_health(fake_nvml):
614
743
  fake_nvml([_FakeDevice(ecc_errors=1)])
@@ -855,6 +984,35 @@ def test_detect_usage_merges_into_the_given_devices(fake_nvml):
855
984
  assert [device.memory for device in devices] == [23034] * 2
856
985
 
857
986
 
987
+ def test_detect_usage_skips_a_card_that_cannot_be_queried(fake_nvml):
988
+ fake = fake_nvml(
989
+ [
990
+ _FakeDevice(uuid="GPU-0"),
991
+ _FakeDevice(uuid="GPU-1"),
992
+ _FakeDevice(uuid="GPU-2"),
993
+ ],
994
+ )
995
+ detector = NVIDIADetector()
996
+ devices = detector.detect_info()
997
+ # The card falls off the bus between the two queries.
998
+ fake.devices[1].query_error_code = _FakeNVML.NVML_ERROR_GPU_IS_LOST
999
+
1000
+ detector.detect_usage(devices)
1001
+
1002
+ assert [device.temperature for device in devices] == [47, None, 47]
1003
+
1004
+
1005
+ def test_detect_usage_fails_when_no_card_can_be_queried(fake_nvml):
1006
+ fake = fake_nvml([_FakeDevice(uuid="GPU-0"), _FakeDevice(uuid="GPU-1")])
1007
+ detector = NVIDIADetector()
1008
+ devices = detector.detect_info()
1009
+ for device in fake.devices:
1010
+ device.query_error_code = _FakeNVML.NVML_ERROR_GPU_IS_LOST
1011
+
1012
+ with pytest.raises(_NVMLError):
1013
+ detector.detect_usage(devices)
1014
+
1015
+
858
1016
  def test_detect_usage_detects_the_information_first(fake_nvml):
859
1017
  fake_nvml([_FakeDevice()])
860
1018
 
@@ -1 +0,0 @@
1
- git_commit = "40cea8d"