gpustack-runtime 0.2.7.post1__tar.gz → 0.2.7.post3__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 (162) hide show
  1. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/PKG-INFO +1 -1
  2. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/_version.py +2 -2
  3. gpustack_runtime-0.2.7.post3/gpustack_runtime/_version_appendix.py +1 -0
  4. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/__types__.py +45 -26
  5. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/ascend.py +3 -1
  6. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/docker.py +26 -44
  7. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/kubernetes.py +7 -9
  8. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/__types__.py +4 -2
  9. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/ascend.py +21 -2
  10. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/iluvatar.py +9 -0
  11. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/nvidia.py +9 -0
  12. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/envs.py +14 -0
  13. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +232 -3
  14. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_ascend.py +65 -1
  15. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_detector_types.py +5 -5
  16. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_iluvatar.py +29 -0
  17. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_nvidia.py +26 -0
  18. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/uv.lock +3 -3
  19. gpustack_runtime-0.2.7.post1/gpustack_runtime/_version_appendix.py +0 -1
  20. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.agents/skills/runtime-release/SKILL.md +0 -0
  21. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.codespelldict +0 -0
  22. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.codespellrc +0 -0
  23. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.dockerignore +0 -0
  24. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.gitattributes +0 -0
  25. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.gitignore +0 -0
  26. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.pre-commit-config.yaml +0 -0
  27. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/.python-version +0 -0
  28. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/ADOPTERS.md +0 -0
  29. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/AGENTS.md +0 -0
  30. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/DCO +0 -0
  31. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/LICENSE +0 -0
  32. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/Makefile +0 -0
  33. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/README.md +0 -0
  34. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/deploy/manifests/docker-compose.yaml +0 -0
  35. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/deploy/manifests/kubernetes.yaml +0 -0
  36. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/docs/index.md +0 -0
  37. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/docs/modules/gpustack_runtime.deployer.md +0 -0
  38. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/docs/modules/gpustack_runtime.detector.md +0 -0
  39. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/docs/modules/gpustack_runtime.md +0 -0
  40. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/__init__.py +0 -0
  41. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/__main__.py +0 -0
  42. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/_version.pyi +0 -0
  43. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/cmds/__init__.py +0 -0
  44. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/cmds/__types__.py +0 -0
  45. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/cmds/deployer.py +0 -0
  46. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/cmds/detector.py +0 -0
  47. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/cmds/images.py +0 -0
  48. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/__init__.py +0 -0
  49. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/__patches__.py +0 -0
  50. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/__utils__.py +0 -0
  51. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
  52. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
  53. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
  54. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/amd.py +0 -0
  55. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
  56. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
  57. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/metax.py +0 -0
  58. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/cdi/thead.py +0 -0
  59. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
  60. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/deployer/podman.py +0 -0
  61. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/__init__.py +0 -0
  62. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/__utils__.py +0 -0
  63. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/amd.py +0 -0
  64. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/cambricon.py +0 -0
  65. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/hygon.py +0 -0
  66. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/metax.py +0 -0
  67. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/mthreads.py +0 -0
  68. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
  69. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
  70. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
  71. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
  72. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
  73. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
  74. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
  75. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
  76. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
  77. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
  78. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
  79. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
  80. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
  81. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
  82. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/detector/thead.py +0 -0
  83. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/gpustack_runtime/logging.py +0 -0
  84. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/hatch.toml +0 -0
  85. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/mkdocs.yml +0 -0
  86. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/pack/Dockerfile +0 -0
  87. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/pack/Dockerfile.dummy +0 -0
  88. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/pyproject.toml +0 -0
  89. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/pytest.ini +0 -0
  90. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/ruff.toml +0 -0
  91. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
  92. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/specs/2026-10-30-detector-health-alignment-and-identity-cache.md +0 -0
  93. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
  94. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
  95. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
  96. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
  97. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
  98. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
  99. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
  100. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
  101. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
  102. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +0 -0
  103. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
  104. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
  105. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_logs_options.py +0 -0
  106. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
  107. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
  108. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
  109. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
  110. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
  111. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
  112. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +0 -0
  113. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
  114. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/conftest.py +0 -0
  115. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
  116. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/README.md +0 -0
  117. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
  118. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
  119. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
  120. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
  121. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
  122. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
  123. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
  124. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
  125. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
  126. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
  127. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
  128. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
  129. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
  130. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
  131. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
  132. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
  133. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
  134. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
  135. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
  136. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
  137. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
  138. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
  139. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
  140. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
  141. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
  142. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
  143. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
  144. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
  145. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
  146. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
  147. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
  148. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
  149. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_amd.py +0 -0
  150. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
  151. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_detector_cache.py +0 -0
  152. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
  153. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
  154. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
  155. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_metax.py +0 -0
  156. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
  157. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
  158. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
  159. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
  160. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_samples.py +0 -0
  161. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/tests/gpustack_runtime/detector/test_thead.py +0 -0
  162. {gpustack_runtime-0.2.7.post1 → gpustack_runtime-0.2.7.post3}/uv.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gpustack-runtime
3
- Version: 0.2.7.post1
3
+ Version: 0.2.7.post3
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.7.post1'
31
- __version_tuple__ = version_tuple = (0, 2, 7, 'post1')
30
+ __version__ = version = '0.2.7.post3'
31
+ __version_tuple__ = version_tuple = (0, 2, 7, 'post3')
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 = "2c2ea31"
@@ -8,6 +8,7 @@ from abc import ABC, abstractmethod
8
8
  from concurrent.futures import ThreadPoolExecutor
9
9
  from dataclasses import dataclass, field
10
10
  from enum import Enum
11
+ from threading import Lock
11
12
  from typing import TYPE_CHECKING, Any
12
13
 
13
14
  from dataclasses_json import dataclass_json
@@ -1466,7 +1467,7 @@ class DevicesMaterial:
1466
1467
  """
1467
1468
  Mapping devices to runtime visible devices env values,
1468
1469
  the key is the device index string,
1469
- the value is the device index string or uuid.
1470
+ the value is the device index string, physical id string, or uuid.
1470
1471
  For example, {"0": "GPU-11111111-2222-3333-4444-555555555555"} for NVIDIA.
1471
1472
  """
1472
1473
  backend_values: dict[str, dict[str, str]] = field(default_factory=dict)
@@ -1492,6 +1493,9 @@ class DevicesMaterial:
1492
1493
  """
1493
1494
 
1494
1495
 
1496
+ UNKNOWN_RUNTIME_ENV = "UNKNOWN_RUNTIME_VISIBLE_DEVICES"
1497
+
1498
+
1495
1499
  class Deployer(ABC):
1496
1500
  """
1497
1501
  Base class for all deployers.
@@ -1549,6 +1553,7 @@ class Deployer(ABC):
1549
1553
 
1550
1554
  def __init__(self, name: str):
1551
1555
  self._name = name
1556
+ self._materials_lock = Lock()
1552
1557
 
1553
1558
  def __enter__(self):
1554
1559
  return self
@@ -1556,15 +1561,30 @@ class Deployer(ABC):
1556
1561
  def __exit__(self, exc_type, exc_value, traceback):
1557
1562
  self.close()
1558
1563
 
1559
- def _prepare(self):
1564
+ def _prepare(self) -> dict[str, DevicesMaterial]:
1560
1565
  """
1561
- Detect devices and prepare materials.
1566
+ Build and cache device materials while the caller holds the cache lock.
1562
1567
  """
1563
- if self._materials is not None:
1564
- return
1568
+ materials = self._detect_materials()
1569
+ if materials:
1570
+ self._materials = materials
1571
+ return materials
1565
1572
 
1566
- self._materials = {}
1573
+ # Keep the generic fallback available without caching an empty detection.
1574
+ ben = "UNKNOWN_BACKEND_VISIBLE_DEVICES"
1575
+ return {
1576
+ UNKNOWN_RUNTIME_ENV: DevicesMaterial(
1577
+ manufacturer=ManufacturerEnum.UNKNOWN,
1578
+ runtime_env=UNKNOWN_RUNTIME_ENV,
1579
+ backend_env=[ben],
1580
+ cdi="unknown.com/gpu",
1581
+ runtime_values={"all": "all"},
1582
+ backend_values={ben: {"all": "all"}},
1583
+ ),
1584
+ }
1567
1585
 
1586
+ def _detect_materials(self) -> dict[str, DevicesMaterial]:
1587
+ materials: dict[str, DevicesMaterial] = {}
1568
1588
  devices = detect_devices(fast=False)
1569
1589
  if self.allowed_mig_devices:
1570
1590
  devices = expand_mig_devices(devices)
@@ -1604,20 +1624,29 @@ class Deployer(ABC):
1604
1624
  dev_cpus_affinities: dict[str, str] = {}
1605
1625
  for dev_i, dev in enumerate(devs):
1606
1626
  dev_index = str(dev.index)
1627
+ dev_appendix = dev.appendix or {}
1607
1628
  if valued_runtime_uuid:
1608
1629
  dev_runtime_values[dev_index] = dev.uuid
1630
+ elif manu == ManufacturerEnum.ASCEND:
1631
+ # ascend-docker-runtime and the Ascend CDI spec
1632
+ # address each NPU by the driver's physical id
1633
+ # (/dev/davinci<N>), while Device.index carries the
1634
+ # DCMI logic id that callers schedule by.
1635
+ dev_runtime_values[dev_index] = str(
1636
+ dev_appendix.get("physical_id", dev_index),
1637
+ )
1609
1638
  else:
1610
1639
  dev_runtime_values[dev_index] = dev_index
1611
1640
  dev_backend_values[dev_index] = dev_index
1612
- if dev.appendix.get("sliced", False):
1641
+ if dev_appendix.get("sliced", False):
1613
1642
  dev_backend_values[dev_index] = dev.uuid
1614
1643
  dev_backend_aligned_values[dev_index] = str(dev_i)
1615
- dev_numa_affinities[dev_index] = dev.appendix.get("numa", "")
1644
+ dev_numa_affinities[dev_index] = dev_appendix.get("numa", "")
1616
1645
  dev_cpus_affinities[dev_index] = map_numa_node_to_cpu_affinity(
1617
1646
  dev_numa_affinities[dev_index],
1618
1647
  )
1619
1648
 
1620
- self._materials[ren] = DevicesMaterial(
1649
+ materials[ren] = DevicesMaterial(
1621
1650
  manufacturer=manu,
1622
1651
  runtime_env=ren,
1623
1652
  backend_env=ben_list,
@@ -1638,21 +1667,7 @@ class Deployer(ABC):
1638
1667
  cpus_affinities=dev_cpus_affinities,
1639
1668
  )
1640
1669
 
1641
- if self._materials:
1642
- return
1643
-
1644
- # Fallback to unknown backend
1645
- ren = "UNKNOWN_RUNTIME_VISIBLE_DEVICES"
1646
- ben_list = ["UNKNOWN_BACKEND_VISIBLE_DEVICES"]
1647
- cdi = "unknown.com/gpu"
1648
- self._materials[ren] = DevicesMaterial(
1649
- manufacturer=ManufacturerEnum.UNKNOWN,
1650
- runtime_env=ren,
1651
- backend_env=ben_list,
1652
- cdi=cdi,
1653
- runtime_values={"all": "all"},
1654
- backend_values={ben: {"all": "all"} for ben in ben_list},
1655
- )
1670
+ return materials
1656
1671
 
1657
1672
  def _get_materials(
1658
1673
  self,
@@ -1665,8 +1680,12 @@ class Deployer(ABC):
1665
1680
  to corresponding devices materials.
1666
1681
 
1667
1682
  """
1668
- self._prepare()
1669
- return self._materials
1683
+ if self._materials is not None:
1684
+ return self._materials
1685
+ with self._materials_lock:
1686
+ if self._materials is not None:
1687
+ return self._materials
1688
+ return self._prepare()
1670
1689
 
1671
1690
  def get_manufacturer(
1672
1691
  self,
@@ -251,9 +251,11 @@ class AscendGenerator(Generator):
251
251
  container_device_nodes.append(cdn)
252
252
 
253
253
  # Add specific container edits for each device.
254
+ # Name the CDI device by the physical id as well, matching what
255
+ # Deployer._prepare puts in runtime_values for fmt="cdi".
254
256
  cdi_devices.append(
255
257
  ConfigDevice(
256
- name=str(dev.index),
258
+ name=str(cdn_number),
257
259
  container_edits=ConfigContainerEdits(
258
260
  device_nodes=container_device_nodes,
259
261
  ),
@@ -29,6 +29,7 @@ from .. import envs
29
29
  from ..logging import debug_log_exception, debug_log_warning
30
30
  from .__types__ import (
31
31
  DEFAULT_TERMINATION_GRACE_PERIOD_SECONDS,
32
+ UNKNOWN_RUNTIME_ENV,
32
33
  Container,
33
34
  ContainerCheck,
34
35
  ContainerEnv,
@@ -1076,53 +1077,34 @@ class DockerDeployer(EndoscopicDeployer):
1076
1077
  manu,
1077
1078
  )
1078
1079
 
1079
- # Request devices.
1080
1080
  if r_v == "all":
1081
- # Configure privileged.
1082
1081
  create_options["privileged"] = True
1083
- # Request all devices.
1084
- for ren in runtime_envs:
1082
+
1083
+ for ren in runtime_envs:
1084
+ if r_v == "all" or privileged:
1085
1085
  r_vs = self.get_runtime_visible_devices(ren, fmt)
1086
- # Request device via CDI.
1087
- if cdi:
1088
- if "device_requests" not in create_options:
1089
- create_options["device_requests"] = []
1090
- create_options["device_requests"].append(
1091
- docker.types.DeviceRequest(
1092
- driver="cdi",
1093
- count=0,
1094
- device_ids=r_vs,
1095
- ),
1096
- )
1097
- continue
1098
- # Request device via visible devices env.
1099
- create_options["environment"][ren] = ",".join(r_vs)
1100
- else:
1101
- # Request specific devices.
1102
- for ren in runtime_envs:
1103
- # Request all devices if privileged,
1104
- # otherwise, normalize requested devices.
1105
- if privileged:
1106
- r_vs = self.get_runtime_visible_devices(ren, fmt)
1107
- else:
1108
- r_vs = self.map_runtime_visible_devices(
1109
- ren,
1110
- resource_values,
1111
- fmt,
1112
- )
1113
- # Request device via CDI.
1114
- if cdi:
1115
- if "device_requests" not in create_options:
1116
- create_options["device_requests"] = []
1117
- create_options["device_requests"].append(
1118
- docker.types.DeviceRequest(
1119
- driver="cdi",
1120
- count=0,
1121
- device_ids=r_vs,
1122
- ),
1123
- )
1124
- continue
1125
- # Request device via visible devices env.
1086
+ else:
1087
+ r_vs = self.map_runtime_visible_devices(
1088
+ ren,
1089
+ resource_values,
1090
+ fmt,
1091
+ )
1092
+ if not r_vs or (ren == UNKNOWN_RUNTIME_ENV and r_v != "all"):
1093
+ msg = (
1094
+ f"Cannot create container {container_name}: "
1095
+ f"no detected devices for {ren} "
1096
+ f"(requested {r_k}={r_v})"
1097
+ )
1098
+ raise OperationError(msg)
1099
+ if cdi:
1100
+ create_options.setdefault("device_requests", []).append(
1101
+ docker.types.DeviceRequest(
1102
+ driver="cdi",
1103
+ count=0,
1104
+ device_ids=r_vs,
1105
+ ),
1106
+ )
1107
+ else:
1126
1108
  create_options["environment"][ren] = ",".join(r_vs)
1127
1109
 
1128
1110
  # If not requesting all devices but privileged,
@@ -1844,24 +1844,22 @@ class KubernetesDeployer(EndoscopicDeployer):
1844
1844
  self._materials_cache: dict[str, dict[str, DevicesMaterial]] = {}
1845
1845
  self._materials_locks = {policy: Lock() for policy in ("env", "kdp")}
1846
1846
 
1847
- def _prepare(self):
1847
+ def _get_materials(self) -> dict[str, DevicesMaterial]:
1848
1848
  """
1849
1849
  Reuse device materials built for the same resolved injection policy.
1850
1850
  """
1851
1851
  if self._materials is not None:
1852
- return
1852
+ return self._materials
1853
1853
  policy = self._resolve_resource_injection_policy()
1854
1854
  with self._materials_locks[policy]:
1855
1855
  if policy not in self._materials_cache:
1856
1856
  self._runtime_uuid_values_allowed = policy != "kdp"
1857
- try:
1858
- super()._prepare()
1859
- except Exception:
1860
- # Incomplete detection must not become a reusable device map.
1861
- self._materials = None
1862
- raise
1863
- self._materials_cache[policy] = self._materials
1857
+ materials = self._prepare()
1858
+ if self._materials is not None:
1859
+ self._materials_cache[policy] = self._materials
1860
+ return materials
1864
1861
  self._materials = self._materials_cache[policy]
1862
+ return self._materials
1865
1863
 
1866
1864
  @property
1867
1865
  def allowed_runtime_uuid_values(self) -> bool:
@@ -172,9 +172,11 @@ class Device:
172
172
  """
173
173
  index: int = 0
174
174
  """
175
- Index of the device, as the detector enumerates it.
175
+ Index of the device, as the detector enumerates it by default.
176
176
  Driver-physical numbering, which a device node path or a vendor tool needs,
177
- lives in `appendix` instead, e.g. `minor_number` or `card_id`/`physical_id`.
177
+ lives in `appendix` (`minor_number` or `card_id`/`physical_id`), and is
178
+ also used as `index` when `GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY`
179
+ is enabled.
178
180
  """
179
181
  name: str = ""
180
182
  """
@@ -194,6 +194,8 @@ class AscendDetector(Detector):
194
194
  dev_index,
195
195
  )
196
196
  continue
197
+ if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
198
+ dev_index = dev_physical_id
197
199
 
198
200
  dev_uuid = _get_device_die(dev_card_id, dev_device_id)
199
201
 
@@ -359,7 +361,11 @@ class AscendDetector(Detector):
359
361
  ret.append(
360
362
  Device(
361
363
  manufacturer=self.manufacturer,
362
- index=dev_index,
364
+ index=(
365
+ dev_physical_id
366
+ if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY
367
+ else dev_index
368
+ ),
363
369
  name=dev_name,
364
370
  uuid=dev_uuid.upper(),
365
371
  driver_version=None,
@@ -515,7 +521,20 @@ class AscendDetector(Detector):
515
521
 
516
522
  try:
517
523
  for dev_index in pydcmi.dcmiv2_get_device_list():
518
- dev_uuid = uuid_by_index.get(dev_index)
524
+ lookup_index = dev_index
525
+ if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
526
+ try:
527
+ lookup_index = pydcmi.dcmiv2_get_chip_phy_id_by_dev_id(
528
+ dev_index,
529
+ )
530
+ except pydcmi.DCMIError:
531
+ debug_log_warning(
532
+ logger,
533
+ "Failed to get physical id of device %d, skipping it this round",
534
+ dev_index,
535
+ )
536
+ continue
537
+ dev_uuid = uuid_by_index.get(lookup_index)
519
538
  if not dev_uuid:
520
539
  continue
521
540
 
@@ -131,6 +131,15 @@ class IluvatarDetector(Detector):
131
131
  dev_minor_number = None
132
132
  with contextlib.suppress(pyixml.NVMLError):
133
133
  dev_minor_number = pyixml.nvmlDeviceGetMinorNumber(dev)
134
+ if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
135
+ if dev_minor_number is None:
136
+ debug_log_warning(
137
+ logger,
138
+ "Failed to fetch minor number of device %d, skipping it",
139
+ dev_index,
140
+ )
141
+ continue
142
+ dev_index = dev_minor_number
134
143
 
135
144
  dev_name = pyixml.nvmlDeviceGetName(dev)
136
145
 
@@ -174,6 +174,15 @@ class NVIDIADetector(Detector):
174
174
  dev_minor_number = None
175
175
  with contextlib.suppress(pynvml.NVMLError):
176
176
  dev_minor_number = pynvml.nvmlDeviceGetMinorNumber(dev)
177
+ if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
178
+ if dev_minor_number is None:
179
+ debug_log_warning(
180
+ logger,
181
+ "Failed to fetch minor number of device %d, skipping it",
182
+ dev_index,
183
+ )
184
+ continue
185
+ dev_index = dev_minor_number
177
186
 
178
187
  # Report the physical card, whether or not MIG is enabled.
179
188
  # MIG instances are partitioned on demand by the operator's
@@ -77,6 +77,14 @@ if TYPE_CHECKING:
77
77
  e.g `{"cuda": "nvidia.com/devices", "rocm": "amd.com/devices"}`.
78
78
  Used to map the gpustack-runner's backend name to the corresponding resource key.
79
79
  """
80
+ GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY: bool = False
81
+ """
82
+ Use physical index priority at detecting devices.
83
+ When enabled, detectors that expose a distinct driver-physical index
84
+ (e.g. `physical_id` on Ascend, `minor_number` on NVIDIA and Iluvatar)
85
+ report that physical index as `Device.index` instead of the logical or
86
+ enumeration index.
87
+ """
80
88
  ## Deployer
81
89
  GPUSTACK_RUNTIME_DEPLOY: str | None = None
82
90
  """
@@ -438,6 +446,12 @@ variables: dict[str, Callable[[], Any]] = {
438
446
  "hggc=alibabacloud.com/devices;",
439
447
  ),
440
448
  ),
449
+ "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY": lambda: to_bool(
450
+ getenv(
451
+ "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
452
+ "0",
453
+ ),
454
+ ),
441
455
  ## Deployer
442
456
  "GPUSTACK_RUNTIME_DEPLOY": lambda: getenv(
443
457
  "GPUSTACK_RUNTIME_DEPLOY",