fix: restore sm_60 (P100) PyTorch kernels in GPU image (best-effort, unverified against real fleet) - #1561
Open
shivansh193 wants to merge 1 commit into
Open
Conversation
The Colab GPU base image ships PyTorch built against a CUDA wheel
index (currently cu128) whose compute-capability list is
sm_70/75/80/86/90/100/120 -- it drops sm_60 (Pascal, e.g. the Tesla
P100 Kaggle's scheduler still assigns as a free GPU option). Any real
GPU op on a P100 then fails with "CUDA error: no kernel image is
available for execution on the device", even for plain fp16
model.generate() calls with no quantization involved.
PyTorch's cu126 wheels are still built for {50,60,70,75,80,86,90}
(verified against pytorch/pytorch's
.ci/manywheel/build_env_setup.py arch table), so for GPU images only,
reinstall the *same* torch/torchvision/torchaudio version from the
cu126 index instead of whatever the base image pulled. This restores
sm_60 while keeping every GPU Kaggle currently offers (T4, sm_75)
working. The tradeoff is losing sm_100/sm_120 (Blackwell) kernels,
which Kaggle does not currently offer as a notebook accelerator.
Fixes Kaggle#1546
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Contributor
|
Hey Kaggle staff here, i saw that you mention a PR i am working on note that google cloud is deprecating p100s which Kaggle relies on: Kaggle team is working on moving users over to T4 for new notebooks and sessions, |
shivansh193
added a commit
to shivansh193/hippovoice
that referenced
this pull request
Sep 5, 2026
A coordinate-descent sweep (decay_lambda x relevance_weight x top_k) on Kaggle found top_k as the actual driver of a real improvement: 24.1% -> 27.74% avg F1 on the full 1540-question LoCoMo set, with the whole score distribution shifting favorably (fewer near-zero, more partial and high), not just the mean. decay_lambda and relevance_weight landed at values statistically indistinguishable from the existing defaults. Deliberately did not bump run_locomo()'s shared top_k default (still 5) -- Mem0-style/A-MEM-style were both run at top_k=5 and haven't been re-swept, so changing the shared default would silently make the README comparison table apples-to-oranges. scripts/run_full_locomo.py and colab.ipynb's LoCoMo cell both opt into top_k=10 explicitly for HippoVoice only. Also documents a real, currently-open Kaggle platform bug hit while running the sweep (P100 GPU assignment + a PyTorch build with zero compiled kernels for that architecture), the --accelerator NvidiaTeslaT4 workaround, and a good-faith upstream fix attempt at Kaggle/docker-python#1561. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
What
Fixes #1546 (Tesla P100 / sm_60 + recent PyTorch build incompatibility). For GPU images only, reinstalls the same
torch/torchvision/torchaudioversion already selected by the Colab base image, but from thecu126wheel index instead of whichever CUDA index the base image used (currentlycu128).Root cause (as I found it)
FROM us-docker.pkg.dev/colab-images/public/runtime:....Dockerfile.tmpldoesn't install PyTorch directly — itpip freezes the base image's existingtorch/torchvision/etc. versions into/colab_requirements.txtand reinstalls those exact versions (see lines 9-17). So the actual PyTorch wheel/CUDA-index choice is inherited from the upstream Colab image, not controlled by anything in this repo today.pytorch/pytorch's current.ci/manywheel/build_env_setup.py(TORCH_CUDA_ARCH_LIST_TABLE), PyTorch's officially published wheels have per-CUDA-version compute-capability sets, e.g.:cu126→{50, 60, 70, 75, 80, 86, 90}(x86_64) — includes sm_60sm_70 sm_75 sm_80 sm_86 sm_90 sm_100 sm_120reported in the issue and intorch.cuda's own startup warning) dropsm_50/sm_60in exchange forsm_100/sm_120(Blackwell) support.--index-url https://download.pytorch.org/whl/cu126was independently found by users to fix P100, while leaving T4 (sm_75) unaffected.tests/common.pyalready has a long-standingp100_exempttest decorator (b/342143152 P100s are slowly being unsupported in new release of popular ml tools such as RAPIDS), andtests/test_pytorch.py'sp100_exempt-marked tests (test_gpu_computation, a.sum()reduction;test_linalg) line up exactly with the failure mode reported in Pytorch CUDA P100 GPU Incompatibility #1546 and its comments. So this appears to be a recurring, known category of breakage rather than a one-off regression, which is part of why I think a build-level fix is worth proposing rather than only a per-user workaround.The change
In
Dockerfile.tmpl, right after the existing "Install Kaggle packages" step (which installs whatevertorchversion the base image already has), add a GPU-only step that force-reinstalls the same torch/torchvision/torchaudio version from thecu126index:{{ if eq .Accelerator "gpu" }} RUN TORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])") && \ uv pip install --system --no-cache --force-reinstall \ "torch==${TORCH_VERSION}" torchvision torchaudio \ --index-url https://download.pytorch.org/whl/cu126 \ --extra-index-url https://pypi.org/simple {{ end }}I deliberately did not hardcode a torch version — it reads back whatever version is already installed (from the base image) and re-pulls that same version's
cu126build, so this doesn't fight the existing "freeze the base image's version" mechanism and shouldn't need to be bumped every time the Colab base image updates. It's scoped to the GPU template branch only; I renderedDockerfile.tmpllocally withrenderizer --ACCELERATOR=gpuand--ACCELERATOR=noneto confirm the new block only appears in the GPU output.What I could not verify
I don't have access to Kaggle's build pipeline, its Jenkins GPU executors, or an actual P100/T4 to test against, so I could not:
kaggle_requirements.txtor the base image that may have been compiled/linked against thecu128build's ABI — I don't have visibility into whether anything like that exists).cu126wheel arch table includes sm_60, and that this specificcu128→cu126swap-at-same-version was independently reported to work by commenters on Pytorch CUDA P100 GPU Incompatibility #1546).So please treat this as a best-effort, plausible starting point for someone with access to your actual CI/build pipeline to verify and adjust, not a guaranteed-correct fix.
Other context I noticed while investigating
While looking through recent branches/PRs I came across #1560 ("chore: drop P100 from the CI pipeline"), which is tearing down the P100 Jenkins CI/build agent. I don't know if that reflects a broader decision to deprecate P100 as a user-facing accelerator too, in which case this PR may be moot — flagging it in case it's useful context for triage, and apologies in advance if this duplicates effort already in flight internally.
Scope
This only touches
Dockerfile.tmpl's GPU branch. I did not touch tests, CI, or anything else, per the intent of keeping this change minimal and targeted at the specific issue.