gpustack-runtime 0.2.7.post2__tar.gz → 0.2.8__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.7.post2 → gpustack_runtime-0.2.8}/PKG-INFO +1 -1
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/_version.py +2 -2
- gpustack_runtime-0.2.8/gpustack_runtime/_version_appendix.py +1 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__types__.py +12 -3
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/ascend.py +3 -1
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__types__.py +4 -2
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/ascend.py +30 -3
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/iluvatar.py +9 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/nvidia.py +9 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/envs.py +14 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +118 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_ascend.py +65 -1
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_detector_types.py +5 -5
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_iluvatar.py +29 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_nvidia.py +26 -0
- gpustack_runtime-0.2.7.post2/gpustack_runtime/_version_appendix.py +0 -1
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.agents/skills/runtime-release/SKILL.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.codespelldict +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.codespellrc +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.dockerignore +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.gitattributes +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.gitignore +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.pre-commit-config.yaml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.python-version +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/ADOPTERS.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/AGENTS.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/DCO +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/LICENSE +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/Makefile +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/README.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/deploy/manifests/docker-compose.yaml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/deploy/manifests/kubernetes.yaml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/index.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/modules/gpustack_runtime.deployer.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/modules/gpustack_runtime.detector.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/modules/gpustack_runtime.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/__main__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/_version.pyi +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/cmds/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/cmds/__types__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/cmds/deployer.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/cmds/detector.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/cmds/images.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__patches__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__utils__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/amd.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/metax.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/thead.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/docker.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/kubernetes.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/podman.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__utils__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/amd.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/cambricon.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/hygon.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/metax.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/mthreads.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/thead.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/logging.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/hatch.toml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/mkdocs.yml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/pack/Dockerfile +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/pack/Dockerfile.dummy +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/pyproject.toml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/pytest.ini +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/ruff.toml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/specs/2026-10-30-detector-health-alignment-and-identity-cache.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_logs_options.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_privileged.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_runtime_class.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/deployer/test_workload_status.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/conftest.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/README.md +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_amd.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_detector_cache.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_metax.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_samples.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_thead.py +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/uv.lock +0 -0
- {gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/uv.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gpustack-runtime
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
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.
|
|
31
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
30
|
+
__version__ = version = '0.2.8'
|
|
31
|
+
__version_tuple__ = version_tuple = (0, 2, 8)
|
|
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 = "762e9b4"
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__types__.py
RENAMED
|
@@ -1467,7 +1467,7 @@ class DevicesMaterial:
|
|
|
1467
1467
|
"""
|
|
1468
1468
|
Mapping devices to runtime visible devices env values,
|
|
1469
1469
|
the key is the device index string,
|
|
1470
|
-
the value is the device index string or uuid.
|
|
1470
|
+
the value is the device index string, physical id string, or uuid.
|
|
1471
1471
|
For example, {"0": "GPU-11111111-2222-3333-4444-555555555555"} for NVIDIA.
|
|
1472
1472
|
"""
|
|
1473
1473
|
backend_values: dict[str, dict[str, str]] = field(default_factory=dict)
|
|
@@ -1624,15 +1624,24 @@ class Deployer(ABC):
|
|
|
1624
1624
|
dev_cpus_affinities: dict[str, str] = {}
|
|
1625
1625
|
for dev_i, dev in enumerate(devs):
|
|
1626
1626
|
dev_index = str(dev.index)
|
|
1627
|
+
dev_appendix = dev.appendix or {}
|
|
1627
1628
|
if valued_runtime_uuid:
|
|
1628
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
|
+
)
|
|
1629
1638
|
else:
|
|
1630
1639
|
dev_runtime_values[dev_index] = dev_index
|
|
1631
1640
|
dev_backend_values[dev_index] = dev_index
|
|
1632
|
-
if
|
|
1641
|
+
if dev_appendix.get("sliced", False):
|
|
1633
1642
|
dev_backend_values[dev_index] = dev.uuid
|
|
1634
1643
|
dev_backend_aligned_values[dev_index] = str(dev_i)
|
|
1635
|
-
dev_numa_affinities[dev_index] =
|
|
1644
|
+
dev_numa_affinities[dev_index] = dev_appendix.get("numa", "")
|
|
1636
1645
|
dev_cpus_affinities[dev_index] = map_numa_node_to_cpu_affinity(
|
|
1637
1646
|
dev_numa_affinities[dev_index],
|
|
1638
1647
|
)
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/ascend.py
RENAMED
|
@@ -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.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__types__.py
RENAMED
|
@@ -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`
|
|
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
|
|
|
@@ -324,7 +326,15 @@ class AscendDetector(Detector):
|
|
|
324
326
|
)
|
|
325
327
|
continue
|
|
326
328
|
|
|
327
|
-
|
|
329
|
+
try:
|
|
330
|
+
dev_bdf = pydcmi.dcmiv2_get_device_bdf(dev_index)
|
|
331
|
+
except pydcmi.DCMIError:
|
|
332
|
+
debug_log_warning(
|
|
333
|
+
logger,
|
|
334
|
+
"Failed to fetch BDF of device %d, faking it",
|
|
335
|
+
dev_index,
|
|
336
|
+
)
|
|
337
|
+
dev_bdf = f"0000:00:00.{dev_index:x}"
|
|
328
338
|
|
|
329
339
|
dev_uuid = _get_device_die_v2(dev_index, dev_bdf)
|
|
330
340
|
|
|
@@ -359,7 +369,11 @@ class AscendDetector(Detector):
|
|
|
359
369
|
ret.append(
|
|
360
370
|
Device(
|
|
361
371
|
manufacturer=self.manufacturer,
|
|
362
|
-
index=
|
|
372
|
+
index=(
|
|
373
|
+
dev_physical_id
|
|
374
|
+
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY
|
|
375
|
+
else dev_index
|
|
376
|
+
),
|
|
363
377
|
name=dev_name,
|
|
364
378
|
uuid=dev_uuid.upper(),
|
|
365
379
|
driver_version=None,
|
|
@@ -515,7 +529,20 @@ class AscendDetector(Detector):
|
|
|
515
529
|
|
|
516
530
|
try:
|
|
517
531
|
for dev_index in pydcmi.dcmiv2_get_device_list():
|
|
518
|
-
|
|
532
|
+
lookup_index = dev_index
|
|
533
|
+
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
|
|
534
|
+
try:
|
|
535
|
+
lookup_index = pydcmi.dcmiv2_get_chip_phy_id_by_dev_id(
|
|
536
|
+
dev_index,
|
|
537
|
+
)
|
|
538
|
+
except pydcmi.DCMIError:
|
|
539
|
+
debug_log_warning(
|
|
540
|
+
logger,
|
|
541
|
+
"Failed to get physical id of device %d, skipping it this round",
|
|
542
|
+
dev_index,
|
|
543
|
+
)
|
|
544
|
+
continue
|
|
545
|
+
dev_uuid = uuid_by_index.get(lookup_index)
|
|
519
546
|
if not dev_uuid:
|
|
520
547
|
continue
|
|
521
548
|
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/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
|
|
|
@@ -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",
|
|
@@ -489,3 +489,121 @@ def test_visible_devices_ordering_injection_with_device_plugin(
|
|
|
489
489
|
)
|
|
490
490
|
actual = [v for n, v in container_envs if n == _ORDERING_ENV]
|
|
491
491
|
assert actual == expected, f"case {name} expected {expected}, but got {actual}"
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
def _ascend_310p_devices() -> list[Device]:
|
|
495
|
+
"""
|
|
496
|
+
Reproduce the 4 x Atlas 300I Pro (Ascend 310P3) layout from issue #6747:
|
|
497
|
+
DCMI logic ids 0..3, driver physical ids 0, 2, 4, 6 (/dev/davinci0,2,4,6).
|
|
498
|
+
"""
|
|
499
|
+
return [
|
|
500
|
+
Device(
|
|
501
|
+
manufacturer=ManufacturerEnum.ASCEND,
|
|
502
|
+
index=logic_id,
|
|
503
|
+
name="Ascend310P3",
|
|
504
|
+
uuid=f"DIE-{logic_id}",
|
|
505
|
+
appendix={"physical_id": physical_id},
|
|
506
|
+
)
|
|
507
|
+
for logic_id, physical_id in ((0, 0), (1, 2), (2, 4), (3, 6))
|
|
508
|
+
]
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
def test_prepare_maps_ascend_runtime_values_to_physical_ids(monkeypatch):
|
|
512
|
+
monkeypatch.setattr(
|
|
513
|
+
"gpustack_runtime.deployer.__types__.detect_devices",
|
|
514
|
+
lambda **_kwargs: _ascend_310p_devices(),
|
|
515
|
+
)
|
|
516
|
+
deployer = object.__new__(DockerDeployer)
|
|
517
|
+
Deployer.__init__(deployer, "test")
|
|
518
|
+
|
|
519
|
+
materials = deployer._get_materials()
|
|
520
|
+
|
|
521
|
+
ascend_material = materials["ASCEND_VISIBLE_DEVICES"]
|
|
522
|
+
assert ascend_material.runtime_values == {
|
|
523
|
+
"0": "0",
|
|
524
|
+
"1": "2",
|
|
525
|
+
"2": "4",
|
|
526
|
+
"3": "6",
|
|
527
|
+
}
|
|
528
|
+
assert ascend_material.backend_values == {
|
|
529
|
+
"ASCEND_RT_VISIBLE_DEVICES": {"0": "0", "1": "1", "2": "2", "3": "3"},
|
|
530
|
+
"NPU_VISIBLE_DEVICES": {"0": "0", "1": "1", "2": "2", "3": "3"},
|
|
531
|
+
}
|
|
532
|
+
assert deployer.get_runtime_visible_devices("ASCEND_VISIBLE_DEVICES", "plain") == [
|
|
533
|
+
"0",
|
|
534
|
+
"2",
|
|
535
|
+
"4",
|
|
536
|
+
"6",
|
|
537
|
+
]
|
|
538
|
+
assert deployer.map_runtime_visible_devices(
|
|
539
|
+
"ASCEND_VISIBLE_DEVICES",
|
|
540
|
+
["1", "3"],
|
|
541
|
+
"plain",
|
|
542
|
+
) == ["2", "6"]
|
|
543
|
+
assert deployer.map_runtime_visible_devices(
|
|
544
|
+
"ASCEND_VISIBLE_DEVICES",
|
|
545
|
+
["1", "3"],
|
|
546
|
+
"cdi",
|
|
547
|
+
) == ["huawei.com/npu=2", "huawei.com/npu=6"]
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
@pytest.mark.parametrize(
|
|
551
|
+
"runner",
|
|
552
|
+
[
|
|
553
|
+
_docker_container_envs,
|
|
554
|
+
_kubernetes_container_envs,
|
|
555
|
+
],
|
|
556
|
+
ids=["docker", "kubernetes"],
|
|
557
|
+
)
|
|
558
|
+
@pytest.mark.parametrize(
|
|
559
|
+
"name, resources, privileged, expected_envs",
|
|
560
|
+
[
|
|
561
|
+
(
|
|
562
|
+
"privileged single card uses all physical ids for runtime and aligned index for backend",
|
|
563
|
+
{"huawei.com/devices": "2"},
|
|
564
|
+
True,
|
|
565
|
+
{
|
|
566
|
+
"ASCEND_VISIBLE_DEVICES": "0,2,4,6",
|
|
567
|
+
"ASCEND_RT_VISIBLE_DEVICES": "2",
|
|
568
|
+
"NPU_VISIBLE_DEVICES": "2",
|
|
569
|
+
},
|
|
570
|
+
),
|
|
571
|
+
(
|
|
572
|
+
"unprivileged subset maps logic ids to physical ids",
|
|
573
|
+
{"huawei.com/devices": "1,3"},
|
|
574
|
+
False,
|
|
575
|
+
{
|
|
576
|
+
"ASCEND_VISIBLE_DEVICES": "2,6",
|
|
577
|
+
},
|
|
578
|
+
),
|
|
579
|
+
],
|
|
580
|
+
)
|
|
581
|
+
def test_ascend_env_injection_uses_physical_ids(
|
|
582
|
+
name,
|
|
583
|
+
resources,
|
|
584
|
+
privileged,
|
|
585
|
+
expected_envs,
|
|
586
|
+
runner,
|
|
587
|
+
monkeypatch,
|
|
588
|
+
):
|
|
589
|
+
monkeypatch.setattr(
|
|
590
|
+
"gpustack_runtime.deployer.__types__.detect_devices",
|
|
591
|
+
lambda **_kwargs: _ascend_310p_devices(),
|
|
592
|
+
)
|
|
593
|
+
probe_deployer = object.__new__(DockerDeployer)
|
|
594
|
+
Deployer.__init__(probe_deployer, "test")
|
|
595
|
+
materials = probe_deployer._get_materials()
|
|
596
|
+
|
|
597
|
+
container_envs = dict(
|
|
598
|
+
runner(
|
|
599
|
+
materials,
|
|
600
|
+
_container(resources, privileged=privileged),
|
|
601
|
+
monkeypatch,
|
|
602
|
+
),
|
|
603
|
+
)
|
|
604
|
+
|
|
605
|
+
for env_key, expected_val in expected_envs.items():
|
|
606
|
+
assert container_envs.get(env_key) == expected_val, f"case {name}: {env_key}"
|
|
607
|
+
if not privileged:
|
|
608
|
+
assert "ASCEND_RT_VISIBLE_DEVICES" not in container_envs
|
|
609
|
+
assert "NPU_VISIBLE_DEVICES" not in container_envs
|
|
@@ -887,8 +887,10 @@ def test_cdi_emits_no_vdavinci_path(monkeypatch):
|
|
|
887
887
|
|
|
888
888
|
assert config is not None
|
|
889
889
|
assert not any("vdavinci" in path for path in seen_paths)
|
|
890
|
-
# The device carrying a physical id is addressed by it
|
|
890
|
+
# The device carrying a physical id is addressed and named by it, so a CDI
|
|
891
|
+
# request built from runtime_values resolves to that same device node.
|
|
891
892
|
assert "/dev/davinci3" in seen_paths
|
|
893
|
+
assert [dev.name for dev in config.devices] == ["3", "all"]
|
|
892
894
|
# The device without one is skipped: Device.index is the logic id, so
|
|
893
895
|
# standing it in for the physical id would address another NPU's node.
|
|
894
896
|
assert "/dev/davinci1" not in seen_paths
|
|
@@ -1763,3 +1765,65 @@ def test_detect_reproduces_the_950pr_host(fake_pydcmi_v2):
|
|
|
1763
1765
|
# Every card has to be told apart, which the address fallback still manages.
|
|
1764
1766
|
assert len({d.uuid for d in devices}) == 8
|
|
1765
1767
|
assert [d.appendix["physical_id"] for d in devices] == list(range(8))
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
def test_detect_physical_index_priority_uses_physical_id_as_index(
|
|
1771
|
+
fake_pydcmi,
|
|
1772
|
+
monkeypatch,
|
|
1773
|
+
):
|
|
1774
|
+
fake_pydcmi(
|
|
1775
|
+
[
|
|
1776
|
+
_Unit(card_id=1, device_id=0, logic_id=0, physical_id=0),
|
|
1777
|
+
_Unit(card_id=2, device_id=0, logic_id=1, physical_id=2),
|
|
1778
|
+
_Unit(card_id=4, device_id=0, logic_id=2, physical_id=4),
|
|
1779
|
+
_Unit(card_id=5, device_id=0, logic_id=3, physical_id=6),
|
|
1780
|
+
],
|
|
1781
|
+
)
|
|
1782
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1783
|
+
|
|
1784
|
+
devices = AscendDetector().detect_info()
|
|
1785
|
+
|
|
1786
|
+
assert [d.index for d in devices] == [0, 2, 4, 6]
|
|
1787
|
+
assert [d.appendix["physical_id"] for d in devices] == [0, 2, 4, 6]
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
def test_detect_v2_physical_index_priority_uses_physical_id_and_merges_usage(
|
|
1791
|
+
fake_pydcmi_v2,
|
|
1792
|
+
monkeypatch,
|
|
1793
|
+
):
|
|
1794
|
+
fake_pydcmi_v2(
|
|
1795
|
+
[
|
|
1796
|
+
_UnitV2(dev_id=0, phy_id=0, die_types=()),
|
|
1797
|
+
_UnitV2(dev_id=1, phy_id=2, die_types=()),
|
|
1798
|
+
],
|
|
1799
|
+
)
|
|
1800
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1801
|
+
|
|
1802
|
+
devices = AscendDetector().detect(usage=True)
|
|
1803
|
+
|
|
1804
|
+
assert [d.index for d in devices] == [0, 2]
|
|
1805
|
+
assert [d.appendix["physical_id"] for d in devices] == [0, 2]
|
|
1806
|
+
assert all(d.cores_utilization == _UnitV2().cores_utilization for d in devices)
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
def test_detect_usage_v2_physical_index_priority_skips_failed_phy_id_lookup(
|
|
1810
|
+
fake_pydcmi_v2,
|
|
1811
|
+
monkeypatch,
|
|
1812
|
+
):
|
|
1813
|
+
fake = fake_pydcmi_v2(
|
|
1814
|
+
[
|
|
1815
|
+
_UnitV2(dev_id=0, phy_id=0, cores_utilization=11),
|
|
1816
|
+
_UnitV2(dev_id=1, phy_id=2, cores_utilization=22),
|
|
1817
|
+
_UnitV2(dev_id=2, phy_id=4, cores_utilization=33),
|
|
1818
|
+
],
|
|
1819
|
+
)
|
|
1820
|
+
monkeypatch.setattr(envs, "GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY", True)
|
|
1821
|
+
|
|
1822
|
+
devices = AscendDetector().detect_info()
|
|
1823
|
+
# A transient physical-id failure on dev_id=2 must not fall back to
|
|
1824
|
+
# lookup_index=2 and collide with dev_id=1 (whose physical_id is 2).
|
|
1825
|
+
fake.units[2].phy_id_readable = False
|
|
1826
|
+
|
|
1827
|
+
AscendDetector().detect_usage(devices)
|
|
1828
|
+
|
|
1829
|
+
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
|
|
|
@@ -583,6 +583,32 @@ def test_detect_info_omits_an_unreadable_minor_number(fake_nvml):
|
|
|
583
583
|
assert "minor_number" not in devices[0].appendix
|
|
584
584
|
|
|
585
585
|
|
|
586
|
+
def test_detect_info_physical_index_priority_skips_unreadable_minor_number(
|
|
587
|
+
fake_nvml,
|
|
588
|
+
monkeypatch,
|
|
589
|
+
):
|
|
590
|
+
monkeypatch.setattr(
|
|
591
|
+
nvidia.envs,
|
|
592
|
+
"GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY",
|
|
593
|
+
True,
|
|
594
|
+
raising=False,
|
|
595
|
+
)
|
|
596
|
+
fake_nvml(
|
|
597
|
+
[
|
|
598
|
+
_FakeDevice(uuid="GPU-0", minor_number=1),
|
|
599
|
+
_FakeDevice(uuid="GPU-1", minor_number=None),
|
|
600
|
+
],
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
devices = NVIDIADetector().detect_info()
|
|
604
|
+
|
|
605
|
+
assert [
|
|
606
|
+
(dev.uuid, dev.index, dev.appendix.get("minor_number")) for dev in devices
|
|
607
|
+
] == [
|
|
608
|
+
("GPU-0", 1, 1),
|
|
609
|
+
]
|
|
610
|
+
|
|
611
|
+
|
|
586
612
|
@pytest.mark.usefixtures("health_check")
|
|
587
613
|
def test_detect_info_reports_the_memory_health(fake_nvml):
|
|
588
614
|
fake_nvml([_FakeDevice(ecc_errors=1)])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
git_commit = "42d5150"
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/.agents/skills/runtime-release/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/deploy/manifests/docker-compose.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/modules/gpustack_runtime.deployer.md
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/docs/modules/gpustack_runtime.detector.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__patches__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/__utils__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__types__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/__utils__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/amd.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/hygon.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/iluvatar.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/metax.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/cdi/thead.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/deployer/kubernetes.py
RENAMED
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/__utils__.py
RENAMED
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/cambricon.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/mthreads.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pydcmi/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pydmi/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/libhgml.so
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhgml/libuki.so
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyhsa/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pyixml/__init__.py
RENAMED
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pymtml/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/gpustack_runtime/detector/pynvml/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/conftest.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gpustack_runtime-0.2.7.post2 → gpustack_runtime-0.2.8}/tests/gpustack_runtime/detector/test_amd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|