[Bugfix][CI/Build] Fail closed when selected precompiled CUDA variant is unavailable (#52545)
Signed-off-by: Jung Jiyu <jiyu.jung@navercorp.com>
This commit is contained in:
@@ -134,9 +134,9 @@ When installing vLLM with `VLLM_USE_PRECOMPILED=1`, the `setup.py` script:
|
|||||||
|
|
||||||
1. **Determines wheel location** via `precompiled_wheel_utils.determine_wheel_url()`:
|
1. **Determines wheel location** via `precompiled_wheel_utils.determine_wheel_url()`:
|
||||||
- Env var `VLLM_PRECOMPILED_WHEEL_LOCATION` (user-specified URL/path) always takes precedence and skips all other steps.
|
- Env var `VLLM_PRECOMPILED_WHEEL_LOCATION` (user-specified URL/path) always takes precedence and skips all other steps.
|
||||||
- Determines the variant from `VLLM_MAIN_CUDA_VERSION` (can be overridden with env var `VLLM_PRECOMPILED_WHEEL_VARIANT`); the default variant will also be tried as a fallback.
|
- For CUDA, uses `VLLM_PRECOMPILED_WHEEL_VARIANT` when specified. Otherwise, an explicitly set `VLLM_MAIN_CUDA_VERSION` selects the variant; if unset, the CUDA version is detected from PyTorch or nvidia-smi, with the default `VLLM_MAIN_CUDA_VERSION` used if detection fails.
|
||||||
- Determines the _base commit_ (explained later) of this branch (can be overridden with env var `VLLM_PRECOMPILED_WHEEL_COMMIT`).
|
- Determines the _base commit_ (explained later) of this branch (can be overridden with env var `VLLM_PRECOMPILED_WHEEL_COMMIT`).
|
||||||
2. **Fetches metadata** from `https://wheels.vllm.ai/{commit}/vllm/metadata.json` (for the default variant) or `https://wheels.vllm.ai/{commit}/{variant}/vllm/metadata.json` (for a specific variant).
|
2. **For CUDA, fetches metadata** for the selected variant from `https://wheels.vllm.ai/{commit}/{variant}/vllm/metadata.json`.
|
||||||
3. **Selects compatible wheel** based on:
|
3. **Selects compatible wheel** based on:
|
||||||
- Package name (`vllm`)
|
- Package name (`vllm`)
|
||||||
- Platform tag (architecture match)
|
- Platform tag (architecture match)
|
||||||
|
|||||||
@@ -892,8 +892,7 @@ class precompiled_wheel_utils:
|
|||||||
1. user-specified wheel location (can be either local or remote, via
|
1. user-specified wheel location (can be either local or remote, via
|
||||||
VLLM_PRECOMPILED_WHEEL_LOCATION)
|
VLLM_PRECOMPILED_WHEEL_LOCATION)
|
||||||
2. user-specified variant (VLLM_PRECOMPILED_WHEEL_VARIANT) from nightly repo
|
2. user-specified variant (VLLM_PRECOMPILED_WHEEL_VARIANT) from nightly repo
|
||||||
or auto-detected CUDA variant based on system (torch, nvidia-smi)
|
or CUDA variant selected from VLLM_MAIN_CUDA_VERSION, torch, or nvidia-smi
|
||||||
3. the default variant from nightly repo
|
|
||||||
|
|
||||||
If downloading from the nightly repo, the commit can be specified via
|
If downloading from the nightly repo, the commit can be specified via
|
||||||
VLLM_PRECOMPILED_WHEEL_COMMIT; otherwise, the head commit in the main branch
|
VLLM_PRECOMPILED_WHEEL_COMMIT; otherwise, the head commit in the main branch
|
||||||
@@ -924,28 +923,21 @@ class precompiled_wheel_utils:
|
|||||||
)
|
)
|
||||||
commit = precompiled_wheel_utils.get_base_commit_in_main_branch()
|
commit = precompiled_wheel_utils.get_base_commit_in_main_branch()
|
||||||
print(f"Using precompiled wheel commit {commit} with variant {variant}")
|
print(f"Using precompiled wheel commit {commit} with variant {variant}")
|
||||||
try_default = False
|
download_filename = None
|
||||||
wheels, repo_url, download_filename = None, None, None
|
|
||||||
try:
|
try:
|
||||||
wheels, repo_url = precompiled_wheel_utils.fetch_metadata_for_variant(
|
wheels, repo_url = precompiled_wheel_utils.fetch_metadata_for_variant(
|
||||||
commit, variant
|
commit, variant
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(
|
raise RuntimeError(
|
||||||
"Failed to fetch precompiled wheel metadata for variant %s: %s",
|
"Failed to fetch precompiled wheel metadata for CUDA "
|
||||||
variant,
|
f"variant {variant!r} at commit {commit}. The "
|
||||||
e,
|
"root/default variant is not used as a fallback because "
|
||||||
)
|
"its CUDA compatibility with the selected variant cannot "
|
||||||
try_default = True # try outside handler to keep the stacktrace simple
|
"be verified. Provide a compatible wheel with "
|
||||||
if try_default:
|
"VLLM_PRECOMPILED_WHEEL_LOCATION or disable "
|
||||||
print("Trying the default variant from remote")
|
"VLLM_USE_PRECOMPILED to build from source."
|
||||||
wheels, repo_url = precompiled_wheel_utils.fetch_metadata_for_variant(
|
) from e
|
||||||
commit, None
|
|
||||||
)
|
|
||||||
# if this also fails, then we have nothing more to try / cache
|
|
||||||
assert wheels is not None and repo_url is not None, (
|
|
||||||
"Failed to fetch precompiled wheel metadata"
|
|
||||||
)
|
|
||||||
# The metadata.json has the following format:
|
# The metadata.json has the following format:
|
||||||
# see .buildkite/scripts/generate-nightly-index.py for details
|
# see .buildkite/scripts/generate-nightly-index.py for details
|
||||||
"""[{
|
"""[{
|
||||||
|
|||||||
Reference in New Issue
Block a user