ci: allocate idle CI devices dynamically#1
Draft
zhangyue207 wants to merge 1 commit into
Draft
Conversation
dc7bb04 to
fff2f5e
Compare
fff2f5e to
dd9bdb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npu-smi infoprocess table entries intoprocess_countandprocess_pids.ixsmiprocess table entries intoprocess_countandprocess_pids./dev/davinci0mount so selected Ascend devices are mounted dynamically byrun.py.Motivation
CI jobs using automatic allocation could still enter containers on devices with leftover processes. The wrapper should choose a process-free device before container launch and expose process metadata in status output for debugging.
The GitHub queued-job watchdog also needs more time for self-hosted runner scheduling, so this PR extends that watchdog from 600 seconds to 1800 seconds.
Scope
This PR targets
codex/prune-unused-ci-artifacts, which contains the.cisubmodule commit currently pinned byInfiniOpsupstream. This keeps the review diff limited to dynamic device allocation and CI watchdog timeout fixes.Test Plan
pytest tests/test_resource.py tests/test_run.py tests/test_workflow.py tests/test_shadow_workflow.py -vRUFF_CACHE_DIR=/tmp/infini-ci-ruff-cache ruff check ci_resource.py tests/test_resource.py tests/test_run.py tests/test_workflow.py tests/test_shadow_workflow.pyRUFF_CACHE_DIR=/tmp/infini-ci-ruff-cache ruff format --check ci_resource.py tests/test_resource.py tests/test_run.py tests/test_workflow.py tests/test_shadow_workflow.pygit diff --checkpython run.py --config config.yml --job ascend_npu --dry-run --gpu-id 3--device=/dev/davinci3:/dev/davinci0; no platform-level/dev/davinci0python run.py --config config.yml --job ascend_npu --dry-runpython run.py --config config.yml --job iluvatar_gpu --dry-run --gpu-id 2CUDA_VISIBLE_DEVICES=2Notes
davinci0inside the container./devpassthrough andCUDA_VISIBLE_DEVICES={id}container behavior; this PR changes only which device is selected automatically.ixsmiselection is covered by parser and allocation unit tests.