gpustack-runtime 0.2.3.post2__tar.gz → 0.2.4__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 (150) hide show
  1. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/PKG-INFO +1 -1
  2. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/_version.py +2 -2
  3. gpustack_runtime-0.2.4/gpustack_runtime/_version_appendix.py +1 -0
  4. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/__utils__.py +81 -0
  5. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/ascend.py +64 -7
  6. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/ascend.py +389 -3
  7. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pydcmi/__init__.py +180 -1
  8. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_ascend.py +711 -0
  9. gpustack_runtime-0.2.3.post2/gpustack_runtime/_version_appendix.py +0 -1
  10. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.codespelldict +0 -0
  11. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.codespellrc +0 -0
  12. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.dockerignore +0 -0
  13. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.gitattributes +0 -0
  14. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.gitignore +0 -0
  15. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.pre-commit-config.yaml +0 -0
  16. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/.python-version +0 -0
  17. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/LICENSE +0 -0
  18. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/Makefile +0 -0
  19. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/README.md +0 -0
  20. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/deploy/manifests/docker-compose.yaml +0 -0
  21. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/deploy/manifests/kubernetes.yaml +0 -0
  22. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/docs/index.md +0 -0
  23. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/docs/modules/gpustack_runtime.deployer.md +0 -0
  24. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/docs/modules/gpustack_runtime.detector.md +0 -0
  25. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/docs/modules/gpustack_runtime.md +0 -0
  26. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/__init__.py +0 -0
  27. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/__main__.py +0 -0
  28. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/_version.pyi +0 -0
  29. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/cmds/__init__.py +0 -0
  30. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/cmds/__types__.py +0 -0
  31. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/cmds/deployer.py +0 -0
  32. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/cmds/detector.py +0 -0
  33. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/cmds/images.py +0 -0
  34. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/__init__.py +0 -0
  35. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/__patches__.py +0 -0
  36. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/__types__.py +0 -0
  37. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/__utils__.py +0 -0
  38. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
  39. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
  40. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/amd.py +0 -0
  41. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
  42. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
  43. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/metax.py +0 -0
  44. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/cdi/thead.py +0 -0
  45. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/docker.py +0 -0
  46. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
  47. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/kuberentes.py +0 -0
  48. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/deployer/podman.py +0 -0
  49. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/__init__.py +0 -0
  50. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/__types__.py +0 -0
  51. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/__utils__.py +0 -0
  52. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/amd.py +0 -0
  53. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/cambricon.py +0 -0
  54. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/hygon.py +0 -0
  55. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/iluvatar.py +0 -0
  56. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/metax.py +0 -0
  57. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/mthreads.py +0 -0
  58. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/nvidia.py +0 -0
  59. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
  60. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
  61. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
  62. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
  63. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
  64. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
  65. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
  66. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
  67. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
  68. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
  69. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
  70. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
  71. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/detector/thead.py +0 -0
  72. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/envs.py +0 -0
  73. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/gpustack_runtime/logging.py +0 -0
  74. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/hatch.toml +0 -0
  75. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/mkdocs.yml +0 -0
  76. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/pack/Dockerfile +0 -0
  77. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/pack/Dockerfile.dummy +0 -0
  78. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/pyproject.toml +0 -0
  79. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/pytest.ini +0 -0
  80. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/ruff.toml +0 -0
  81. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
  82. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
  83. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
  84. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
  85. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
  86. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
  87. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
  88. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
  89. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
  90. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
  91. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
  92. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
  93. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
  94. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
  95. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
  96. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
  97. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
  98. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
  99. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +0 -0
  100. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
  101. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
  102. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/README.md +0 -0
  103. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
  104. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
  105. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
  106. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
  107. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
  108. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
  109. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
  110. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
  111. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
  112. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
  113. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
  114. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
  115. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
  116. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
  117. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
  118. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
  119. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
  120. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
  121. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
  122. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
  123. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
  124. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
  125. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
  126. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
  127. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
  128. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
  129. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
  130. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
  131. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
  132. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
  133. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
  134. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
  135. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_amd.py +0 -0
  136. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
  137. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
  138. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_detector_types.py +0 -0
  139. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
  140. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
  141. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_iluvatar.py +0 -0
  142. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_metax.py +0 -0
  143. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
  144. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
  145. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_nvidia.py +0 -0
  146. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
  147. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_samples.py +0 -0
  148. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/tests/gpustack_runtime/detector/test_thead.py +0 -0
  149. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/uv.lock +0 -0
  150. {gpustack_runtime-0.2.3.post2 → gpustack_runtime-0.2.4}/uv.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gpustack-runtime
3
- Version: 0.2.3.post2
3
+ Version: 0.2.4
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.3.post2'
31
- __version_tuple__ = version_tuple = (0, 2, 3, 'post2')
30
+ __version__ = version = '0.2.4'
31
+ __version_tuple__ = version_tuple = (0, 2, 4)
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 = "59ea8c8"
@@ -143,6 +143,56 @@ def device_to_cdi_device_node(
143
143
  )
144
144
 
145
145
 
146
+ def path_to_cdi_device_nodes(
147
+ path: str,
148
+ permission: str = "rw",
149
+ no_user: bool = False,
150
+ ) -> list[ConfigDeviceNode]:
151
+ """
152
+ Convert a device path, or a directory holding device paths, to ConfigDeviceNodes.
153
+
154
+ A generation may expose a bus as a directory of device nodes rather than as
155
+ a single node -- Ascend's UB does, which is why the operator enumerates it,
156
+ see addUBDevicesFromDir in
157
+ https://gitcode.com/Ascend/mind-cluster/blob/master/component/ascend-common/cdi/devnode.go.
158
+ Both shapes are accepted so that a path which is a plain device node on one
159
+ driver and a directory on another needs no caller-side branch.
160
+
161
+ Args:
162
+ path:
163
+ Path to the device, or to a directory of devices, on the host.
164
+ permission:
165
+ Permissions for the devices.
166
+ no_user:
167
+ Whether to omit user and group information.
168
+
169
+ Returns:
170
+ The ConfigDeviceNode objects, empty if the path holds no device.
171
+
172
+ """
173
+ p = Path(path)
174
+ if not p.is_dir():
175
+ cdn = device_to_cdi_device_node(
176
+ path=path,
177
+ permission=permission,
178
+ no_user=no_user,
179
+ )
180
+ return [cdn] if cdn else []
181
+
182
+ return [
183
+ cdn
184
+ for entry in sorted(p.iterdir())
185
+ if not entry.is_dir()
186
+ and (
187
+ cdn := device_to_cdi_device_node(
188
+ path=str(entry),
189
+ permission=permission,
190
+ no_user=no_user,
191
+ )
192
+ )
193
+ ]
194
+
195
+
146
196
  def path_to_cdi_mount(
147
197
  path: str,
148
198
  container_path: str | None = None,
@@ -181,3 +231,34 @@ def path_to_cdi_mount(
181
231
  container_path=container_path,
182
232
  options=options,
183
233
  )
234
+
235
+
236
+ def glob_to_cdi_mounts(
237
+ pattern: str,
238
+ options: list[str] | None = None,
239
+ ) -> list[ConfigMount]:
240
+ """
241
+ Convert every path matching a glob pattern to ConfigMounts.
242
+
243
+ A user-space library is versioned in its file name, so the set of files to
244
+ mount cannot be spelled out ahead of time -- the operator's mount profile
245
+ lists them as patterns for the same reason.
246
+
247
+ Args:
248
+ pattern:
249
+ Path on the host whose last segment may carry a wildcard; the
250
+ directory part is taken literally, so a wildcard there matches
251
+ nothing. A pattern without a wildcard resolves to that path alone.
252
+ options:
253
+ Mount options.
254
+
255
+ Returns:
256
+ The ConfigMount objects, empty if nothing matches.
257
+
258
+ """
259
+ p = Path(pattern)
260
+ return [
261
+ cm
262
+ for path in sorted(p.parent.glob(p.name))
263
+ if (cm := path_to_cdi_mount(path=str(path), options=options))
264
+ ]
@@ -1,11 +1,14 @@
1
1
  from __future__ import annotations as __future_annotations__
2
2
 
3
+ import logging
4
+
3
5
  from ...detector import (
4
6
  Devices,
5
7
  ManufacturerEnum,
6
8
  detect_devices,
7
9
  filter_devices_by_manufacturer,
8
10
  )
11
+ from ...detector.ascend import get_ascend_cann_variant
9
12
  from .__types__ import (
10
13
  Config,
11
14
  ConfigContainerEdits,
@@ -14,7 +17,44 @@ from .__types__ import (
14
17
  manufacturer_to_cdi_kind,
15
18
  manufacturer_to_runtime_env,
16
19
  )
17
- from .__utils__ import device_to_cdi_device_node, path_to_cdi_mount
20
+ from .__utils__ import (
21
+ device_to_cdi_device_node,
22
+ glob_to_cdi_mounts,
23
+ path_to_cdi_device_nodes,
24
+ path_to_cdi_mount,
25
+ )
26
+
27
+ logger = logging.getLogger(__name__)
28
+
29
+ _A5_CANN_VARIANT = "950"
30
+ """
31
+ The CANN variant of the A5 generation, whose UB fabric replaces what the
32
+ earlier generations reach through the shared memory device.
33
+ """
34
+
35
+ _A5_UB_MOUNT_PATTERNS = [
36
+ "/usr/lib64/libummu*",
37
+ "/usr/lib64/liburma*",
38
+ "/usr/lib64/urma",
39
+ "/usr/lib64/libnl*",
40
+ "/usr/bin/urma_admin",
41
+ "/usr/bin/urma_perftest",
42
+ "/usr/bin/urma_ping",
43
+ ]
44
+ """
45
+ The UB user-space libraries an A5 container needs, mirroring the operator's
46
+ mount profile for the Ascend950 generation, see
47
+ https://gitcode.com/Ascend/mind-cluster/blob/master/component/ascend-common/cdi/mount/profile.go.
48
+
49
+ These are mounted for the A5 generation only. Some of them -- libnl above all
50
+ -- are ordinary system libraries present on any host, so mounting them
51
+ unconditionally would shadow what an earlier generation's container ships with
52
+ its own image.
53
+
54
+ The /usr/lib64 prefix is the operator's, and holds on the openEuler and CentOS
55
+ hosts an A5 ships on; a Debian-derived host uses /usr/lib/<triplet>, where none
56
+ of these match -- hence the log line when a pattern finds nothing.
57
+ """
18
58
 
19
59
 
20
60
  class AscendGenerator(Generator):
@@ -73,16 +113,14 @@ class AscendGenerator(Generator):
73
113
  break
74
114
  for p in [
75
115
  "/dev/dvpp_cmdlist",
116
+ # UB exposes a directory of device nodes rather than a single one,
117
+ # so every entry below it has to be injected.
76
118
  "/dev/uburma",
77
119
  "/dev/ummu",
78
120
  "/dev/devmm_svm",
79
121
  "/dev/hisi_hdc",
80
122
  ]:
81
- cdn = device_to_cdi_device_node(
82
- path=p,
83
- )
84
- if cdn:
85
- common_device_nodes.append(cdn)
123
+ common_device_nodes.extend(path_to_cdi_device_nodes(path=p))
86
124
  if not common_device_nodes:
87
125
  return None
88
126
 
@@ -102,6 +140,25 @@ class AscendGenerator(Generator):
102
140
  if cm:
103
141
  common_mounts.append(cm)
104
142
 
143
+ # Device.appendix defaults to None and callers pass their own devices
144
+ # in, so every read goes through `or {}`.
145
+ if any(
146
+ get_ascend_cann_variant((dev.appendix or {}).get("arch_family"))
147
+ == _A5_CANN_VARIANT
148
+ for dev in devices
149
+ if dev
150
+ ):
151
+ for pattern in _A5_UB_MOUNT_PATTERNS:
152
+ ub_mounts = glob_to_cdi_mounts(pattern=pattern)
153
+ if not ub_mounts:
154
+ # Otherwise this surfaces later as a container that cannot
155
+ # reach the UB fabric.
156
+ logger.debug(
157
+ "No UB library matched %s, an A5 container will lack it",
158
+ pattern,
159
+ )
160
+ common_mounts.extend(ub_mounts)
161
+
105
162
  cdi_devices: list[ConfigDevice] = []
106
163
 
107
164
  all_device_nodes = []
@@ -119,7 +176,7 @@ class AscendGenerator(Generator):
119
176
  # addressed by the index, which would resolve to another NPU's
120
177
  # node. The detector already drops such a device; this guards the
121
178
  # devices a caller passes in.
122
- cdn_number = dev.appendix.get("physical_id")
179
+ cdn_number = (dev.appendix or {}).get("physical_id")
123
180
  if cdn_number is None:
124
181
  continue
125
182
  cdn_path = f"/dev/davinci{cdn_number}"