[rhaiis] Add CPU support - #184
Conversation
- Add cpu/cpu-vanilla image fallback keys to rhaiis.yaml
- Add cpu_flavor config key (vanilla/rhaiis) for CPU image selection
- Add vllm_args_cpu section and accelerator_env_vars for cpu/cpu-rhaiis/cpu-vanilla
- Add CPU models: tinyllama-cpu, qwen3-0-6b-cpu, llama-3-2-{1,3}b-cpu,
granite-3-2-2b-cpu, llama31-8b-w8a8-cpu
- Add CPU workloads: cpu-smoke, cpu-{chat,rag,code,summarization}-baseline,
cpu-{chat,code}-realistic (matches format-results cpueval suite)
- Add get_cpu_flavor() and cpu-aware get_serving_image(), get_engine_args(),
merge_env_vars() to runtime_config.py
- Add deploy_cfg_overrides param to _run_test() for per-cell cpu_request sweep
- Fix manifests.py storageUri: hf source never sets storageUri (was using pvc
URI even when storage_source=hf, causing pod pending on missing PVC)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add cpu_concurrent_load_phase.py: models x cpu_requests x workloads matrix orchestrator, matching format-results concurrent-load suite - Add concurrent-load CLI command with --models/--cpu-requests/--workloads/ --cpu-flavor/--continue-on-error/--dry-run options - Extend test CLI --accelerator to accept cpu and l40s; add --cpu-flavor option - Add scripts/diagnose_cpu_cluster.sh: checks AVX2/AVX-512/AMX instruction sets, NUMA topology, CPU Manager policy, KServe CRDs - Add CPU_TESTING.md: end-to-end guide covering cluster setup, single-run tests, concurrent load matrix, model/workload reference tables, and troubleshooting (storage-config secret, slow startup, oneDNN warnings) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Restore HF+PVC storageUri condition in build_inferenceservice (GPU regression)
- Wire --image-pull-secret to image_pull_secrets list (fixes set_config on missing key)
- Add CPU Guaranteed QoS in _build_resources (limits == requests, no GPU keys)
- Fix concurrent-load --cpu-flavor default=None so presets are not clobbered
- Remove cpu_flavor param from cpu_concurrent_load_phase run/do_test
- Fix --serving-image key mapping: rhaiis→images.cpu, vanilla→images.cpu-vanilla
- Remove max-model-len from vllm_args_cpu so per-model value (tinyllama: 2048) wins
- Add CPU presets (cpu, cpu-vanilla, cpu-smoke, vanilla-cpu-smoke, cpu-chat-baseline,
vanilla-cpu-chat-baseline) to presets.d/presets.yaml
- Add explicit CPU guard in ci.py resolve_hardware_request (returns {} early)
- Add test_cpu_config.py: offline validation of image selection, LD_PRELOAD,
max-model-len precedence, and resource Guaranteed QoS
- Update CPU_TESTING.md: preset table, config validation section, flavor default
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @maryamtahhan. Thanks for your PR. I'm waiting for a openshift-psap member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…sed commands Add model-pvc creation as step 5 of cluster setup. Update smoke test and concurrent-load examples to use presets (vanilla-cpu-smoke, cpu-smoke, cpu-vanilla, cpu) rather than explicit --accelerator/--cpu-flavor flags. Add first-run download note and storageClass tip. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 GiB exceeds available NUMA node memory on 16/32 GiB nodes, causing vLLM to crash at startup. 10 GiB works for smoke/CI workloads on small clusters; override per-model or via a preset for production nodes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- runtime_config: fix get_serving_image for CPU — map rhaiis flavor to rhaiis.images.cpu and vanilla to rhaiis.images.cpu-vanilla; drop the try/except that silently fell back after logging a missing-key error on every RHAIIS CPU deploy - cpu_concurrent_load_phase: honour _run_test non-zero return code; previously warnings-only failures were silently swallowed and the matrix exited 0 - README: fix Fournos CPU example — swap args: [cpu] for args: [cpu-chat-baseline] so the preset supplies model, workload, flavor, 64 Gi memory and VLLM_CPU_KVCACHE_SPACE=24; fix image override key from rhaiis.engines.vllm.images.cpu to rhaiis.images.cpu; add rhaiis.images.cpu / rhaiis.images.cpu-vanilla to config-overrides table - CPU_TESTING.md: add 200 Gi PVC recreation snippet after the 50 Gi smoke tip so the 8B / cpu-chat-baseline path is unambiguous Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- cli.py: concurrent-load now reads tests.rhaiis.model_key / workload_key from config (set by preset) when --models / --workloads are omitted, falling back to module defaults only if the key is unset; fixes --preset cpu-chat-baseline still benching TinyLlama - cli.py: setting --cpu-flavor now implies accelerator=cpu in both the test command (_apply_cli_overrides) and concurrent-load; previously flavor alone left the default nvidia accelerator and skipped CPU image routing - CPU_TESTING.md: switch RHAIIS matrix example from --preset cpu to --preset cpu-chat-baseline so model, flavor, memory, and VLLM_CPU_KVCACHE_SPACE=24 are all applied; drop now-redundant --models flag and update the explanatory note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Port the bash diagnostic script into the rhaiis toolbox DSL so it can integrate into orchestration (e.g. as a preflight step) and be invoked via run_toolbox like all other toolbox commands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fetch node names once in show_node_resources and store in context.nodes instead of calling oc get nodes at the start of each task. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced by projects/rhaiis/toolbox/diagnose_cpu_cluster/main.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gnose toolbox - concurrent-load: replace try/except fallback with snapshot comparison so bare runs default to tinyllama-cpu x cpu-chat-baseline instead of GPU keys - ci.py preflight: call diagnose_cpu_cluster for CPU jobs instead of no-op warning - CPU_TESTING.md: point step 2 at ./bin/run_toolbox rhaiis diagnose_cpu_cluster - diagnose toolbox: search full oc debug stdout for AVX flags (banner-safe) - diagnose toolbox: extract first JSON object before json.loads for cpu_manager_state - diagnose toolbox: add comment that hardcoded image tags must match config.d/rhaiis.yaml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…doc wording - ci.py preflight: drop return of diagnose_cpu_cluster() result (execute_tasks returns a context object, not int); always return 0 after the toolbox runs - cli.py concurrent-load: guard preset-override path with CPU-shape checks (endswith -cpu / startswith cpu-) so a GPU model preset never bleeds into the CPU matrix defaults - CPU_TESTING.md: "The script checks:" → "The toolbox checks:" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
This PR adds full CPU accelerator support to the RHAIIS orchestration layer,
covering engine configuration, manifest generation, CLI ergonomics, and
concurrent-load testing — plus fixes for regressions introduced during the rebase.
feat: CPU accelerator support (
1aed41c)Engine / config
runtime_config.py:get_engine_argsreturnsrhaiis.vllm_args_cpufor CPU;get_serving_imageresolvesrhaiis.images.cpu/rhaiis.images.cpu-vanillaby flavor;merge_env_varslayersaccelerator_env_vars.cpu+accelerator_env_vars.cpu-{flavor}(LD_PRELOAD only onrhaiis)config.d/rhaiis.yaml: addsrhaiis.images.cpu/cpu-vanilla,vllm_args_cpu(trust-remote-code, no-enable-log-requests, tensor-parallel-size: 1),accelerator_env_vars.cpu(VLLM_CPU_KVCACHE_SPACE=40),accelerator_env_vars.cpu-rhaiis(LD_PRELOAD)config.d/models.yaml: addstinyllama-cpu,qwen3-0-6b-cpu,llama-3-2-1b-cpu,llama-3-2-3b-cpu,granite-3-2-2b-cpu,llama31-8b-w8a8-cpuwith per-modelmax-model-lenandvllm_argsconfig.d/workloads.yaml: addscpu-smoke,cpu-chat-baseline,cpu-rag-baseline,cpu-code-baseline,cpu-summarization-baseline,cpu-chat-realistic,cpu-code-realisticCLI
cli.py test: adds--accelerator cpu,--cpu-flavor {rhaiis,vanilla}flags;_apply_cli_overrideswires accelerator/flavor/engine into config; dry-run prints CPU flavormanifests.py: passesacceleratorthrough to_build_resources; CPU branch in_build_resourcessets Guaranteed QoS (limits == requests, no GPU keys)test_phase.py: passesacceleratorto manifest buildersDocs / tooling
CPU_TESTING.md: full guide — cluster setup (login → diagnose → namespace → secrets → PVC → artifact dir), preset-based smoke test and concurrent-load commands, model/workload/image tables, troubleshootingscripts/diagnose_cpu_cluster.sh: checks node resources, AVX2/AVX-512/AMX, NUMA topology, CPU Manager policy, KServe CRDsfeat: CPU concurrent load matrix (
5280090)cpu_concurrent_load_phase.py:run/do_testsweepmodels × cpu_requests × workloads, calling_run_testwithdeploy_cfg_overrides={cpu_request: ...}per cell; honourscontinue_on_errorcli.py concurrent-load: new subcommand with--models,--cpu-requests,--workloads,--namespace,--cpu-flavor,--image-pull-secret,--service-account-name,--continue-on-error,--dry-runtinyllama-cpu,[8, 16, 32]CPU requests,cpu-chat-baselinefix: CPU accelerator regressions (
388cdee)if storage_source == "hf" and storage_pvc/elif storage_source != "hf"— the branch had inadvertently flipped the condition topvc, causing GPU jobs to lose the model cache PVC--image-pull-secretraises on missing key: was callingset_config("rhaiis.deploy.image_pull_secret", ...)(singular, non-existent); now writes[secret]torhaiis.deploy.image_pull_secrets(the actual list key) in bothtestandconcurrent-load; dry-run updated to match_build_resourcesCPU branch now returns early with matchinglimitsandrequestsfor cpu/memory; without limits the pod could burst the whole node--cpu-flavorclobbering presets:concurrent-load --cpu-flavordefault changed from"vanilla"toNone; flavor is onlyset_config'd when explicitly passed;cpu_concurrent_load_phasedrops thecpu_flavorparam entirely so preset values survive--models,--cpu-requests,--workloadsnow strip whitespace on split--serving-imagekey mapping:rhaiisflavor →rhaiis.images.cpu,vanilla→rhaiis.images.cpu-vanilla(was writing non-existentrhaiis.images.cpu-rhaiis)max-model-lenprecedence: removedmax-model-lenfromvllm_args_cpudefaults so per-model values (tinyllama-cpu: 2048) are not overridden by the engine defaultcpu,cpu-vanilla,cpu-smoke,vanilla-cpu-smoke,cpu-chat-baseline,vanilla-cpu-chat-baselinetopresets.d/presets.yamlwithmemory_request: 64Gici.py resolve_hardware_requestreturns{}immediately foraccelerator == "cpu"before any GPU/TP lookuptest_cpu_config.pychecks image selection, LD_PRELOAD isolation, tinyllama max-model-len stays 2048 after merge, and CPU_build_resourcesGuaranteed QoSdocs: CPU_TESTING.md setup flow (
a999cf0)model-pvcPVC creation as step 5 of cluster setup (required — KServe mounts it at/mnt/modelsfor the HF download cache)vanilla-cpu-smoke,cpu-smoke,cpu-vanilla,cpu) rather than explicit flagsTest plan
PYTHONPATH=$PWD python projects/rhaiis/orchestration/test_cpu_config.pypython -m projects.rhaiis.orchestration.cli test --preset vanilla-cpu-smoke --namespace forge-rhaiis --dry-runpython -m projects.rhaiis.orchestration.cli test --preset cpu-smoke --namespace forge-rhaiis --image-pull-secret rhaiis-pull-secret --dry-runpython -m projects.rhaiis.orchestration.cli concurrent-load --preset cpu --image-pull-secret rhaiis-pull-secret --dry-runpython -m projects.rhaiis.orchestration.cli test --preset vanilla-cpu-smoke --namespace forge-rhaiisstorage_source=hf🤖 Generated with Claude Code