diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-30 16:34:30 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-30 16:34:30 -0500 |
| commit | 716205eba862076c1d0fbbff016601272e4614f2 (patch) | |
| tree | dc8c31dcfefa49d53c98d305fe35419da76e58c9 /experiments/crossover_hardware_smoke.py | |
| parent | 906d17e896329e4d2dd8d7f728e4d5a234afe0e4 (diff) | |
experiment: package portable A6000 crossover
Diffstat (limited to 'experiments/crossover_hardware_smoke.py')
| -rwxr-xr-x | experiments/crossover_hardware_smoke.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/experiments/crossover_hardware_smoke.py b/experiments/crossover_hardware_smoke.py new file mode 100755 index 0000000..89c11c2 --- /dev/null +++ b/experiments/crossover_hardware_smoke.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Dependency-free checks for frozen crossover hardware profiles.""" +from crossover_hardware import ( + assert_hardware_report, + policy, + policy_for_report, +) + + +def main(): + report = { + "hardware_profile": "a6000", + "cuda_visible_devices": "3", + "physical_gpu_index": 3, + "physical_gpu_uuid": "GPU-smoke", + "physical_gpu_name": "NVIDIA RTX A6000", + "total_memory_mib": 49140, + } + a6000 = policy_for_report("a6000", report) + assert a6000["allowed_physical_gpu_indices"] == [3] + assert_hardware_report(report, a6000) + gtx = policy("timan107_gtx1080") + assert gtx["allowed_physical_gpu_indices"] == [5, 7] + assert gtx["allowed_device_names"] == ["NVIDIA GeForce GTX 1080"] + print("crossover hardware smoke: all checks passed") + + +if __name__ == "__main__": + main() |
