gpustack-runtime 0.2.5.post4__tar.gz → 0.2.6.post1__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.
- gpustack_runtime-0.2.6.post1/.agents/skills/runtime-release/SKILL.md +100 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.gitignore +4 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/AGENTS.md +2 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/PKG-INFO +2 -2
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/_version.py +2 -2
- gpustack_runtime-0.2.6.post1/gpustack_runtime/_version_appendix.py +1 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/__types__.py +12 -3
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/ascend.py +3 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/__types__.py +4 -2
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/ascend.py +21 -2
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/iluvatar.py +9 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/nvidia.py +9 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/envs.py +14 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/pyproject.toml +1 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +119 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_ascend.py +65 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_detector_types.py +5 -5
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_iluvatar.py +29 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_nvidia.py +26 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/uv.lock +52 -30
- gpustack_runtime-0.2.5.post4/gpustack_runtime/_version_appendix.py +0 -1
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.codespelldict +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.codespellrc +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.dockerignore +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.gitattributes +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.pre-commit-config.yaml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/.python-version +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/ADOPTERS.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/DCO +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/LICENSE +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/Makefile +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/README.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/deploy/manifests/docker-compose.yaml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/deploy/manifests/kubernetes.yaml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/docs/index.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/docs/modules/gpustack_runtime.deployer.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/docs/modules/gpustack_runtime.detector.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/docs/modules/gpustack_runtime.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/__main__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/_version.pyi +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/cmds/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/cmds/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/cmds/deployer.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/cmds/detector.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/cmds/images.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/__patches__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/amd.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/metax.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/cdi/thead.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/docker.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/kubernetes.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/podman.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/amd.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/cambricon.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/hygon.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/metax.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/mthreads.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/thead.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/logging.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/hatch.toml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/mkdocs.yml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/pack/Dockerfile +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/pack/Dockerfile.dummy +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/pytest.ini +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/ruff.toml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_logs_options.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/README.md +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_amd.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_metax.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_samples.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/tests/gpustack_runtime/detector/test_thead.py +0 -0
- {gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/uv.toml +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: runtime-release
|
|
3
|
+
description: Cut a gpustack-runtime package release end to end (select and push the tag, monitor the release workflow, curate the GitHub Release notes).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Runtime release
|
|
7
|
+
|
|
8
|
+
One maintainer duty: cut a package release. Push a version tag; `release.yml` builds and publishes
|
|
9
|
+
it. Then write the GitHub Release notes.
|
|
10
|
+
|
|
11
|
+
## Cut a package release
|
|
12
|
+
|
|
13
|
+
The git tag is the single source of truth: hatch-vcs derives the package version from it at build
|
|
14
|
+
time, and there is no version file to bump. Pushing a `v*.*.*` tag runs
|
|
15
|
+
`.github/workflows/release.yml`: build the distributions, create the GitHub Release with the
|
|
16
|
+
wheel/sdist assets, publish to PyPI, then verify an isolated install. Branch pushes to `main` or
|
|
17
|
+
`v*-dev` run the same job against TestPyPI and create no release.
|
|
18
|
+
|
|
19
|
+
Two workflow facts shape the procedure:
|
|
20
|
+
|
|
21
|
+
- The GitHub Release is a pre-release only when the tag contains `rc`. A final tag goes public and
|
|
22
|
+
becomes `latest` immediately. There is no promotion gate.
|
|
23
|
+
- The workflow generates no baseline notes. The release body starts empty, so curating the notes is
|
|
24
|
+
not polish; it is the entire text the reader gets.
|
|
25
|
+
|
|
26
|
+
PyPI is the irreversible step: a version once published there cannot be re-uploaded or edited.
|
|
27
|
+
|
|
28
|
+
### Hard rules
|
|
29
|
+
|
|
30
|
+
- Tag shapes: `vX.Y.Z` final, `vX.Y.ZrcN` pre-release, `vX.Y.Z.postN` post-release. PEP 440
|
|
31
|
+
canonical spellings only; history contains the non-dotted `v0.2.5postN` — do not repeat it.
|
|
32
|
+
- A tag whose PyPI publish succeeded is burned. NEVER delete or move it; fix forward with a new
|
|
33
|
+
version. Delete-and-recreate is limited to a tag that never reached PyPI and is interactive-only.
|
|
34
|
+
- An `rc` tag stays a pre-release; never mark it latest.
|
|
35
|
+
- Release from `origin/main` HEAD by default. A maintenance line (`v*-dev` branch) targets that
|
|
36
|
+
branch's HEAD; flag the choice in the summary.
|
|
37
|
+
- Interactive mode confirms every mutating step (tag push, note replacement). Auto mode runs
|
|
38
|
+
unattended through note curation and reports the release URL.
|
|
39
|
+
|
|
40
|
+
### 1. Preflight (read-only)
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
gh auth status
|
|
44
|
+
git fetch origin --tags --prune
|
|
45
|
+
git status --porcelain # must be empty
|
|
46
|
+
git tag -l 'v*' --sort=-v:refname | head -5
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Version and commit (confirm)
|
|
50
|
+
|
|
51
|
+
- Pick the target ref: `origin/main` by default, or the `v*-dev` branch for a maintenance line. The
|
|
52
|
+
steps below call it `$TARGET`; `$SHA` is its HEAD (`git rev-parse "$TARGET"`).
|
|
53
|
+
- Read the range since the previous tag: `git log --no-merges --oneline <last>..$TARGET`.
|
|
54
|
+
- Propose the bump from the Conventional Commits in range: any `feat` → minor; fixes, docs, and
|
|
55
|
+
chores → patch. Use `.postN` only to re-issue the same version line (packaging metadata or a
|
|
56
|
+
docs-only rebuild of unchanged content).
|
|
57
|
+
- Confirm the (version, commit) pair before tagging. A final tag publishes immediately, so this
|
|
58
|
+
confirmation is the only gate.
|
|
59
|
+
|
|
60
|
+
### 3. Draft notes
|
|
61
|
+
|
|
62
|
+
Group the range by type: Features / Fixes / Docs / Other; omit empty sections. Keep highlights and
|
|
63
|
+
fold noisy `chore`/`ci`/`test` entries. Link PRs from `(#NNN)` subjects. Do not open the body with
|
|
64
|
+
a heading that repeats the tag. End with the Full Changelog compare URL
|
|
65
|
+
(`https://github.com/gpustack/runtime/compare/<last>...<VER>`). Write the draft to `notes.md`;
|
|
66
|
+
step 5 publishes that file.
|
|
67
|
+
|
|
68
|
+
### 4. Tag and monitor (confirm, then read-only)
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
git tag -a "$VER" "$SHA" -m "Release $VER"
|
|
72
|
+
git push origin "$VER"
|
|
73
|
+
gh run list --branch "$VER" --limit 5 # the release.yml run for the tag
|
|
74
|
+
gh run watch <run-id> --exit-status # background it; wait for the completion notification
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The job's own verify step installs the package from PyPI in an isolated env, but it is unpinned and
|
|
78
|
+
only prints the installed version. A green run proves the upload succeeded, not that PyPI already
|
|
79
|
+
serves the new version; read the verify log's `version =` line and confirm it equals `$VER`. On
|
|
80
|
+
failure read `gh run view <run-id> --log-failed`; retry the same run on transient errors. If the
|
|
81
|
+
failure is real and PyPI already holds the version, cut the next version instead — never re-tag.
|
|
82
|
+
|
|
83
|
+
### 5. Curate notes (confirm)
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
gh release view "$VER" --json body,isPrerelease # the body starts empty
|
|
87
|
+
gh release edit "$VER" --notes-file notes.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A maintenance-line final keeps `--latest=false` when a newer stable tag exists. Verify the badge
|
|
91
|
+
with `gh api repos/gpustack/runtime/releases/latest --jq .tag_name`. An `rc` release stays a
|
|
92
|
+
pre-release and needs no further action.
|
|
93
|
+
|
|
94
|
+
## Scope
|
|
95
|
+
|
|
96
|
+
Package releases and their notes run here. No other repository document changes with a release:
|
|
97
|
+
the version comes from the tag, and no README or docs table tracks it. Container image builds are
|
|
98
|
+
`make package` (`pack/`) and deployment manifests live in `deploy/`; both are outside this skill.
|
|
99
|
+
Docs-only changes never trigger a release: the release workflow ignores docs paths on branch
|
|
100
|
+
pushes, so docs updates need no tag.
|
|
@@ -59,6 +59,8 @@ Setup is `make install` (uv sync plus pre-commit hooks). Day-to-day targets:
|
|
|
59
59
|
`gpustack_runtime/_version.py` is generated by hatch-vcs and `_version_appendix.py` by
|
|
60
60
|
`make prepare`; never hand-edit either.
|
|
61
61
|
|
|
62
|
+
Cut package releases with the [runtime-release](.agents/skills/runtime-release/SKILL.md) skill.
|
|
63
|
+
|
|
62
64
|
### Python conventions
|
|
63
65
|
|
|
64
66
|
- Prefer clarity over cleverness to simplify long-term maintenance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gpustack-runtime
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6.post1
|
|
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
|
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.10
|
|
|
16
16
|
Requires-Dist: argcomplete>=3.6.3
|
|
17
17
|
Requires-Dist: cachetools>=5.5.2
|
|
18
18
|
Requires-Dist: docker>=7.1.0
|
|
19
|
-
Requires-Dist: gpustack-runner>=0.1.
|
|
19
|
+
Requires-Dist: gpustack-runner>=0.1.31
|
|
20
20
|
Requires-Dist: kubernetes>=33.1.0
|
|
21
21
|
Requires-Dist: mthreads-ml-py>=2.2.10
|
|
22
22
|
Requires-Dist: nvidia-ml-py>=13.580.65
|
|
@@ -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.
|
|
31
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
30
|
+
__version__ = version = '0.2.6.post1'
|
|
31
|
+
__version_tuple__ = version_tuple = (0, 2, 6, 'post1')
|
|
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 = "0b93a25"
|
{gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/deployer/__types__.py
RENAMED
|
@@ -1466,7 +1466,7 @@ class DevicesMaterial:
|
|
|
1466
1466
|
"""
|
|
1467
1467
|
Mapping devices to runtime visible devices env values,
|
|
1468
1468
|
the key is the device index string,
|
|
1469
|
-
the value is the device index string or uuid.
|
|
1469
|
+
the value is the device index string, physical id string, or uuid.
|
|
1470
1470
|
For example, {"0": "GPU-11111111-2222-3333-4444-555555555555"} for NVIDIA.
|
|
1471
1471
|
"""
|
|
1472
1472
|
backend_values: dict[str, dict[str, str]] = field(default_factory=dict)
|
|
@@ -1604,15 +1604,24 @@ class Deployer(ABC):
|
|
|
1604
1604
|
dev_cpus_affinities: dict[str, str] = {}
|
|
1605
1605
|
for dev_i, dev in enumerate(devs):
|
|
1606
1606
|
dev_index = str(dev.index)
|
|
1607
|
+
dev_appendix = dev.appendix or {}
|
|
1607
1608
|
if valued_runtime_uuid:
|
|
1608
1609
|
dev_runtime_values[dev_index] = dev.uuid
|
|
1610
|
+
elif manu == ManufacturerEnum.ASCEND:
|
|
1611
|
+
# ascend-docker-runtime and the Ascend CDI spec
|
|
1612
|
+
# address each NPU by the driver's physical id
|
|
1613
|
+
# (/dev/davinci<N>), while Device.index carries the
|
|
1614
|
+
# DCMI logic id that callers schedule by.
|
|
1615
|
+
dev_runtime_values[dev_index] = str(
|
|
1616
|
+
dev_appendix.get("physical_id", dev_index),
|
|
1617
|
+
)
|
|
1609
1618
|
else:
|
|
1610
1619
|
dev_runtime_values[dev_index] = dev_index
|
|
1611
1620
|
dev_backend_values[dev_index] = dev_index
|
|
1612
|
-
if
|
|
1621
|
+
if dev_appendix.get("sliced", False):
|
|
1613
1622
|
dev_backend_values[dev_index] = dev.uuid
|
|
1614
1623
|
dev_backend_aligned_values[dev_index] = str(dev_i)
|
|
1615
|
-
dev_numa_affinities[dev_index] =
|
|
1624
|
+
dev_numa_affinities[dev_index] = dev_appendix.get("numa", "")
|
|
1616
1625
|
dev_cpus_affinities[dev_index] = map_numa_node_to_cpu_affinity(
|
|
1617
1626
|
dev_numa_affinities[dev_index],
|
|
1618
1627
|
)
|
|
@@ -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(
|
|
258
|
+
name=str(cdn_number),
|
|
257
259
|
container_edits=ConfigContainerEdits(
|
|
258
260
|
device_nodes=container_device_nodes,
|
|
259
261
|
),
|
{gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/__types__.py
RENAMED
|
@@ -162,9 +162,11 @@ class Device:
|
|
|
162
162
|
"""
|
|
163
163
|
index: int = 0
|
|
164
164
|
"""
|
|
165
|
-
Index of the device, as the detector enumerates it.
|
|
165
|
+
Index of the device, as the detector enumerates it by default.
|
|
166
166
|
Driver-physical numbering, which a device node path or a vendor tool needs,
|
|
167
|
-
lives in `appendix`
|
|
167
|
+
lives in `appendix` (`minor_number` or `card_id`/`physical_id`), and is
|
|
168
|
+
also used as `index` when `GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY`
|
|
169
|
+
is enabled.
|
|
168
170
|
"""
|
|
169
171
|
name: str = ""
|
|
170
172
|
"""
|
{gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/ascend.py
RENAMED
|
@@ -190,6 +190,8 @@ class AscendDetector(Detector):
|
|
|
190
190
|
dev_index,
|
|
191
191
|
)
|
|
192
192
|
continue
|
|
193
|
+
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
|
|
194
|
+
dev_index = dev_physical_id
|
|
193
195
|
|
|
194
196
|
dev_uuid = _get_device_die(dev_card_id, dev_device_id)
|
|
195
197
|
|
|
@@ -355,7 +357,11 @@ class AscendDetector(Detector):
|
|
|
355
357
|
ret.append(
|
|
356
358
|
Device(
|
|
357
359
|
manufacturer=self.manufacturer,
|
|
358
|
-
index=
|
|
360
|
+
index=(
|
|
361
|
+
dev_physical_id
|
|
362
|
+
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY
|
|
363
|
+
else dev_index
|
|
364
|
+
),
|
|
359
365
|
name=dev_name,
|
|
360
366
|
uuid=dev_uuid.upper(),
|
|
361
367
|
driver_version=None,
|
|
@@ -511,7 +517,20 @@ class AscendDetector(Detector):
|
|
|
511
517
|
|
|
512
518
|
try:
|
|
513
519
|
for dev_index in pydcmi.dcmiv2_get_device_list():
|
|
514
|
-
|
|
520
|
+
lookup_index = dev_index
|
|
521
|
+
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
|
|
522
|
+
try:
|
|
523
|
+
lookup_index = pydcmi.dcmiv2_get_chip_phy_id_by_dev_id(
|
|
524
|
+
dev_index,
|
|
525
|
+
)
|
|
526
|
+
except pydcmi.DCMIError:
|
|
527
|
+
debug_log_warning(
|
|
528
|
+
logger,
|
|
529
|
+
"Failed to get physical id of device %d, skipping it this round",
|
|
530
|
+
dev_index,
|
|
531
|
+
)
|
|
532
|
+
continue
|
|
533
|
+
dev_uuid = uuid_by_index.get(lookup_index)
|
|
515
534
|
if not dev_uuid:
|
|
516
535
|
continue
|
|
517
536
|
|
{gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/iluvatar.py
RENAMED
|
@@ -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
|
|
{gpustack_runtime-0.2.5.post4 → gpustack_runtime-0.2.6.post1}/gpustack_runtime/detector/nvidia.py
RENAMED
|
@@ -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
|
|
@@ -62,6 +62,14 @@ if TYPE_CHECKING:
|
|
|
62
62
|
e.g `{"cuda": "nvidia.com/devices", "rocm": "amd.com/devices"}`.
|
|
63
63
|
Used to map the gpustack-runner's backend name to the corresponding resource key.
|
|
64
64
|
"""
|
|
65
|
+
GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY: bool = False
|
|
66
|
+
"""
|
|
67
|
+
Use physical index priority at detecting devices.
|
|
68
|
+
When enabled, detectors that expose a distinct driver-physical index
|
|
69
|
+
(e.g. `physical_id` on Ascend, `minor_number` on NVIDIA and Iluvatar)
|
|
70
|
+
report that physical index as `Device.index` instead of the logical or
|
|
71
|
+
enumeration index.
|
|
72
|
+
"""
|
|
65
73
|
## Deployer
|
|
66
74
|
GPUSTACK_RUNTIME_DEPLOY: str | None = None
|
|
67
75
|
"""
|
|
@@ -414,6 +422,12 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
414
422
|
"hggc=alibabacloud.com/devices;",
|
|
415
423
|
),
|
|
416
424
|
),
|
|
425
|
+
"GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY": lambda: to_bool(
|
|
426
|
+
getenv(
|
|
427
|
+
"GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
|
|
428
|
+
"0",
|
|
429
|
+
),
|
|
430
|
+
),
|
|
417
431
|
## Deployer
|
|
418
432
|
"GPUSTACK_RUNTIME_DEPLOY": lambda: getenv(
|
|
419
433
|
"GPUSTACK_RUNTIME_DEPLOY",
|
|
@@ -23,7 +23,7 @@ dependencies = [
|
|
|
23
23
|
# NB(thxCode): Pin to this Podman version for a custom patch. See gpustack_runtime/deployer/__patches__.py.
|
|
24
24
|
"podman==5.6.0",
|
|
25
25
|
"pyyaml",
|
|
26
|
-
"gpustack-runner>=0.1.
|
|
26
|
+
"gpustack-runner>=0.1.31",
|
|
27
27
|
"nvidia-ml-py>=13.580.65",
|
|
28
28
|
"mthreads-ml-py>=2.2.10",
|
|
29
29
|
"argcomplete>=3.6.3",
|
|
@@ -25,7 +25,7 @@ from gpustack_runtime.deployer.kubernetes import (
|
|
|
25
25
|
KubernetesWorkloadPlan,
|
|
26
26
|
)
|
|
27
27
|
from gpustack_runtime.deployer.podman import PodmanDeployer, PodmanWorkloadPlan
|
|
28
|
-
from gpustack_runtime.detector import ManufacturerEnum
|
|
28
|
+
from gpustack_runtime.detector import Device, ManufacturerEnum
|
|
29
29
|
|
|
30
30
|
_ORDERING_ENV = "CUDA_DEVICE_ORDER"
|
|
31
31
|
|
|
@@ -378,3 +378,121 @@ def test_visible_devices_ordering_injection_with_device_plugin(
|
|
|
378
378
|
)
|
|
379
379
|
actual = [v for n, v in container_envs if n == _ORDERING_ENV]
|
|
380
380
|
assert actual == expected, f"case {name} expected {expected}, but got {actual}"
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
def _ascend_310p_devices() -> list[Device]:
|
|
384
|
+
"""
|
|
385
|
+
Reproduce the 4 x Atlas 300I Pro (Ascend 310P3) layout from issue #6747:
|
|
386
|
+
DCMI logic ids 0..3, driver physical ids 0, 2, 4, 6 (/dev/davinci0,2,4,6).
|
|
387
|
+
"""
|
|
388
|
+
return [
|
|
389
|
+
Device(
|
|
390
|
+
manufacturer=ManufacturerEnum.ASCEND,
|
|
391
|
+
index=logic_id,
|
|
392
|
+
name="Ascend310P3",
|
|
393
|
+
uuid=f"DIE-{logic_id}",
|
|
394
|
+
appendix={"physical_id": physical_id},
|
|
395
|
+
)
|
|
396
|
+
for logic_id, physical_id in ((0, 0), (1, 2), (2, 4), (3, 6))
|
|
397
|
+
]
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def test_prepare_maps_ascend_runtime_values_to_physical_ids(monkeypatch):
|
|
401
|
+
monkeypatch.setattr(
|
|
402
|
+
"gpustack_runtime.deployer.__types__.detect_devices",
|
|
403
|
+
lambda **_kwargs: _ascend_310p_devices(),
|
|
404
|
+
)
|
|
405
|
+
deployer = object.__new__(DockerDeployer)
|
|
406
|
+
Deployer.__init__(deployer, "test")
|
|
407
|
+
|
|
408
|
+
materials = deployer._get_materials()
|
|
409
|
+
|
|
410
|
+
ascend_material = materials["ASCEND_VISIBLE_DEVICES"]
|
|
411
|
+
assert ascend_material.runtime_values == {
|
|
412
|
+
"0": "0",
|
|
413
|
+
"1": "2",
|
|
414
|
+
"2": "4",
|
|
415
|
+
"3": "6",
|
|
416
|
+
}
|
|
417
|
+
assert ascend_material.backend_values == {
|
|
418
|
+
"ASCEND_RT_VISIBLE_DEVICES": {"0": "0", "1": "1", "2": "2", "3": "3"},
|
|
419
|
+
"NPU_VISIBLE_DEVICES": {"0": "0", "1": "1", "2": "2", "3": "3"},
|
|
420
|
+
}
|
|
421
|
+
assert deployer.get_runtime_visible_devices("ASCEND_VISIBLE_DEVICES", "plain") == [
|
|
422
|
+
"0",
|
|
423
|
+
"2",
|
|
424
|
+
"4",
|
|
425
|
+
"6",
|
|
426
|
+
]
|
|
427
|
+
assert deployer.map_runtime_visible_devices(
|
|
428
|
+
"ASCEND_VISIBLE_DEVICES",
|
|
429
|
+
["1", "3"],
|
|
430
|
+
"plain",
|
|
431
|
+
) == ["2", "6"]
|
|
432
|
+
assert deployer.map_runtime_visible_devices(
|
|
433
|
+
"ASCEND_VISIBLE_DEVICES",
|
|
434
|
+
["1", "3"],
|
|
435
|
+
"cdi",
|
|
436
|
+
) == ["huawei.com/npu=2", "huawei.com/npu=6"]
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
@pytest.mark.parametrize(
|
|
440
|
+
"runner",
|
|
441
|
+
[
|
|
442
|
+
_docker_container_envs,
|
|
443
|
+
_kubernetes_container_envs,
|
|
444
|
+
],
|
|
445
|
+
ids=["docker", "kubernetes"],
|
|
446
|
+
)
|
|
447
|
+
@pytest.mark.parametrize(
|
|
448
|
+
"name, resources, privileged, expected_envs",
|
|
449
|
+
[
|
|
450
|
+
(
|
|
451
|
+
"privileged single card uses all physical ids for runtime and aligned index for backend",
|
|
452
|
+
{"huawei.com/devices": "2"},
|
|
453
|
+
True,
|
|
454
|
+
{
|
|
455
|
+
"ASCEND_VISIBLE_DEVICES": "0,2,4,6",
|
|
456
|
+
"ASCEND_RT_VISIBLE_DEVICES": "2",
|
|
457
|
+
"NPU_VISIBLE_DEVICES": "2",
|
|
458
|
+
},
|
|
459
|
+
),
|
|
460
|
+
(
|
|
461
|
+
"unprivileged subset maps logic ids to physical ids",
|
|
462
|
+
{"huawei.com/devices": "1,3"},
|
|
463
|
+
False,
|
|
464
|
+
{
|
|
465
|
+
"ASCEND_VISIBLE_DEVICES": "2,6",
|
|
466
|
+
},
|
|
467
|
+
),
|
|
468
|
+
],
|
|
469
|
+
)
|
|
470
|
+
def test_ascend_env_injection_uses_physical_ids(
|
|
471
|
+
name,
|
|
472
|
+
resources,
|
|
473
|
+
privileged,
|
|
474
|
+
expected_envs,
|
|
475
|
+
runner,
|
|
476
|
+
monkeypatch,
|
|
477
|
+
):
|
|
478
|
+
monkeypatch.setattr(
|
|
479
|
+
"gpustack_runtime.deployer.__types__.detect_devices",
|
|
480
|
+
lambda **_kwargs: _ascend_310p_devices(),
|
|
481
|
+
)
|
|
482
|
+
probe_deployer = object.__new__(DockerDeployer)
|
|
483
|
+
Deployer.__init__(probe_deployer, "test")
|
|
484
|
+
materials = probe_deployer._get_materials()
|
|
485
|
+
|
|
486
|
+
container_envs = dict(
|
|
487
|
+
runner(
|
|
488
|
+
materials,
|
|
489
|
+
_container(resources, privileged=privileged),
|
|
490
|
+
monkeypatch,
|
|
491
|
+
),
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
for env_key, expected_val in expected_envs.items():
|
|
495
|
+
assert container_envs.get(env_key) == expected_val, f"case {name}: {env_key}"
|
|
496
|
+
if not privileged:
|
|
497
|
+
assert "ASCEND_RT_VISIBLE_DEVICES" not in container_envs
|
|
498
|
+
assert "NPU_VISIBLE_DEVICES" not in container_envs
|
|
@@ -735,8 +735,10 @@ def test_cdi_emits_no_vdavinci_path(monkeypatch):
|
|
|
735
735
|
|
|
736
736
|
assert config is not None
|
|
737
737
|
assert not any("vdavinci" in path for path in seen_paths)
|
|
738
|
-
# The device carrying a physical id is addressed by it
|
|
738
|
+
# The device carrying a physical id is addressed and named by it, so a CDI
|
|
739
|
+
# request built from runtime_values resolves to that same device node.
|
|
739
740
|
assert "/dev/davinci3" in seen_paths
|
|
741
|
+
assert [dev.name for dev in config.devices] == ["3", "all"]
|
|
740
742
|
# The device without one is skipped: Device.index is the logic id, so
|
|
741
743
|
# standing it in for the physical id would address another NPU's node.
|
|
742
744
|
assert "/dev/davinci1" not in seen_paths
|
|
@@ -1462,3 +1464,65 @@ def test_detect_reproduces_the_950pr_host(fake_pydcmi_v2):
|
|
|
1462
1464
|
# Every card has to be told apart, which the address fallback still manages.
|
|
1463
1465
|
assert len({d.uuid for d in devices}) == 8
|
|
1464
1466
|
assert [d.appendix["physical_id"] for d in devices] == list(range(8))
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
def test_detect_physical_index_priority_uses_physical_id_as_index(
|
|
1470
|
+
fake_pydcmi,
|
|
1471
|
+
monkeypatch,
|
|
1472
|
+
):
|
|
1473
|
+
fake_pydcmi(
|
|
1474
|
+
[
|
|
1475
|
+
_Unit(card_id=1, device_id=0, logic_id=0, physical_id=0),
|
|
1476
|
+
_Unit(card_id=2, device_id=0, logic_id=1, physical_id=2),
|
|
1477
|
+
_Unit(card_id=4, device_id=0, logic_id=2, physical_id=4),
|
|
1478
|
+
_Unit(card_id=5, device_id=0, logic_id=3, physical_id=6),
|
|
1479
|
+
],
|
|
1480
|
+
)
|
|
1481
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1482
|
+
|
|
1483
|
+
devices = AscendDetector().detect_info()
|
|
1484
|
+
|
|
1485
|
+
assert [d.index for d in devices] == [0, 2, 4, 6]
|
|
1486
|
+
assert [d.appendix["physical_id"] for d in devices] == [0, 2, 4, 6]
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
def test_detect_v2_physical_index_priority_uses_physical_id_and_merges_usage(
|
|
1490
|
+
fake_pydcmi_v2,
|
|
1491
|
+
monkeypatch,
|
|
1492
|
+
):
|
|
1493
|
+
fake_pydcmi_v2(
|
|
1494
|
+
[
|
|
1495
|
+
_UnitV2(dev_id=0, phy_id=0, die_types=()),
|
|
1496
|
+
_UnitV2(dev_id=1, phy_id=2, die_types=()),
|
|
1497
|
+
],
|
|
1498
|
+
)
|
|
1499
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1500
|
+
|
|
1501
|
+
devices = AscendDetector().detect(usage=True)
|
|
1502
|
+
|
|
1503
|
+
assert [d.index for d in devices] == [0, 2]
|
|
1504
|
+
assert [d.appendix["physical_id"] for d in devices] == [0, 2]
|
|
1505
|
+
assert all(d.cores_utilization == _UnitV2().cores_utilization for d in devices)
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
def test_detect_usage_v2_physical_index_priority_skips_failed_phy_id_lookup(
|
|
1509
|
+
fake_pydcmi_v2,
|
|
1510
|
+
monkeypatch,
|
|
1511
|
+
):
|
|
1512
|
+
fake = fake_pydcmi_v2(
|
|
1513
|
+
[
|
|
1514
|
+
_UnitV2(dev_id=0, phy_id=0, cores_utilization=11),
|
|
1515
|
+
_UnitV2(dev_id=1, phy_id=2, cores_utilization=22),
|
|
1516
|
+
_UnitV2(dev_id=2, phy_id=4, cores_utilization=33),
|
|
1517
|
+
],
|
|
1518
|
+
)
|
|
1519
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1520
|
+
|
|
1521
|
+
devices = AscendDetector().detect_info()
|
|
1522
|
+
# A transient physical-id failure on dev_id=2 must not fall back to
|
|
1523
|
+
# lookup_index=2 and collide with dev_id=1 (whose physical_id is 2).
|
|
1524
|
+
fake.units[2].phy_id_readable = False
|
|
1525
|
+
|
|
1526
|
+
AscendDetector().detect_usage(devices)
|
|
1527
|
+
|
|
1528
|
+
assert [d.cores_utilization for d in devices] == [11, 22, 0]
|
|
@@ -309,11 +309,11 @@ def test_every_detector_accepts_no_usage():
|
|
|
309
309
|
assert devices is None or isinstance(devices, list), det.name
|
|
310
310
|
|
|
311
311
|
|
|
312
|
-
def
|
|
313
|
-
# Device.index
|
|
314
|
-
#
|
|
315
|
-
#
|
|
316
|
-
assert
|
|
312
|
+
def test_physical_index_switch_defaults_to_false():
|
|
313
|
+
# Device.index defaults to the enumeration/logical index so NVIDIA (#6041)
|
|
314
|
+
# and Ascend (#6747) align with runtime/backend expectations out of the box,
|
|
315
|
+
# while keeping the switch available as an opt-in escape hatch.
|
|
316
|
+
assert envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY is False
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
# --------------------------------------------------------------------------- #
|
|
@@ -90,6 +90,7 @@ class FakePyixml:
|
|
|
90
90
|
v2_memory: bool = True,
|
|
91
91
|
health: int = 0,
|
|
92
92
|
health_error_code: int | None = None,
|
|
93
|
+
minor_numbers: list[int | None] | None = None,
|
|
93
94
|
):
|
|
94
95
|
self.calls: list[str] = []
|
|
95
96
|
self.device_count = device_count
|
|
@@ -102,6 +103,7 @@ class FakePyixml:
|
|
|
102
103
|
self.v1_memory_used = 4 * 1024**3
|
|
103
104
|
self.health = health
|
|
104
105
|
self.health_error_code = health_error_code
|
|
106
|
+
self.minor_numbers = minor_numbers
|
|
105
107
|
|
|
106
108
|
# The method names below mirror pyixml's real (camelCase) API one-for-one,
|
|
107
109
|
# so a test can monkeypatch this in as a drop-in for the module.
|
|
@@ -126,6 +128,12 @@ class FakePyixml:
|
|
|
126
128
|
|
|
127
129
|
def nvmlDeviceGetMinorNumber(self, dev): # noqa: N802
|
|
128
130
|
self.calls.append("nvmlDeviceGetMinorNumber")
|
|
131
|
+
if self.minor_numbers is not None:
|
|
132
|
+
minor = self.minor_numbers[dev.index]
|
|
133
|
+
if minor is None:
|
|
134
|
+
msg = "minor number unreadable"
|
|
135
|
+
raise self.NVMLError(msg)
|
|
136
|
+
return minor
|
|
129
137
|
return 10 + dev.index
|
|
130
138
|
|
|
131
139
|
def nvmlDeviceGetName(self, dev): # noqa: N802
|
|
@@ -271,6 +279,27 @@ def test_detect_info_keeps_the_minor_number_appendix(fake_pyixml):
|
|
|
271
279
|
assert [dev.appendix["minor_number"] for dev in devices] == [10, 11]
|
|
272
280
|
|
|
273
281
|
|
|
282
|
+
def test_detect_info_physical_index_priority_skips_unreadable_minor_number(
|
|
283
|
+
fake_pyixml,
|
|
284
|
+
monkeypatch,
|
|
285
|
+
):
|
|
286
|
+
monkeypatch.setattr(
|
|
287
|
+
envs,
|
|
288
|
+
"GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
|
|
289
|
+
True,
|
|
290
|
+
raising=False,
|
|
291
|
+
)
|
|
292
|
+
fake_pyixml(minor_numbers=[1, None])
|
|
293
|
+
|
|
294
|
+
devices = IluvatarDetector().detect_info()
|
|
295
|
+
|
|
296
|
+
assert [
|
|
297
|
+
(dev.uuid, dev.index, dev.appendix.get("minor_number")) for dev in devices
|
|
298
|
+
] == [
|
|
299
|
+
("GPU-0", 1, 1),
|
|
300
|
+
]
|
|
301
|
+
|
|
302
|
+
|
|
274
303
|
def test_detect_info_issues_no_usage_calls(fake_pyixml):
|
|
275
304
|
fake = fake_pyixml()
|
|
276
305
|
|
|
@@ -556,6 +556,32 @@ def test_detect_info_omits_an_unreadable_minor_number(fake_nvml):
|
|
|
556
556
|
assert "minor_number" not in devices[0].appendix
|
|
557
557
|
|
|
558
558
|
|
|
559
|
+
def test_detect_info_physical_index_priority_skips_unreadable_minor_number(
|
|
560
|
+
fake_nvml,
|
|
561
|
+
monkeypatch,
|
|
562
|
+
):
|
|
563
|
+
monkeypatch.setattr(
|
|
564
|
+
nvidia.envs,
|
|
565
|
+
"GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
|
|
566
|
+
True,
|
|
567
|
+
raising=False,
|
|
568
|
+
)
|
|
569
|
+
fake_nvml(
|
|
570
|
+
[
|
|
571
|
+
_FakeDevice(uuid="GPU-0", minor_number=1),
|
|
572
|
+
_FakeDevice(uuid="GPU-1", minor_number=None),
|
|
573
|
+
],
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
devices = NVIDIADetector().detect_info()
|
|
577
|
+
|
|
578
|
+
assert [
|
|
579
|
+
(dev.uuid, dev.index, dev.appendix.get("minor_number")) for dev in devices
|
|
580
|
+
] == [
|
|
581
|
+
("GPU-0", 1, 1),
|
|
582
|
+
]
|
|
583
|
+
|
|
584
|
+
|
|
559
585
|
@pytest.mark.usefixtures("health_check")
|
|
560
586
|
def test_detect_info_reports_the_memory_health(fake_nvml):
|
|
561
587
|
fake_nvml([_FakeDevice(ecc_errors=1)])
|