Skip to content

fix(eval): install host C compiler for Triton on scoring image - #239

Merged
echobt merged 1 commit into
mainfrom
cursor/proof-eval-triton-cc-bb1c
Sep 8, 2026
Merged

fix(eval): install host C compiler for Triton on scoring image#239
echobt merged 1 commit into
mainfrom
cursor/proof-eval-triton-cc-bb1c

Conversation

@echobt

@echobt echobt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Why

Live Proof eval on a 1× B200 Lium pod (pin prefix ff21fd98) loaded Qwen proxy weights then died:

error: Failed to find C compiler. Please specify via CC environment variable or set triton.knobs.build.impl.
exit=1

PROOF_EVAL_OK never printed, so the control plane stayed 503.

eval/Dockerfile.scoring used nvidia/cuda:12.8.1-runtime-ubuntu24.04 and only installed ca-certificates curl openssh-server iproute2 python3 python3-pip python3-venv (+ tini). No gcc/g++. Torch pulls Triton; Triton's first CUDA kernel compile (Qwen SDPA/flash after weight load) needs a host C compiler.

The failure was missing CC, not missing nvcc / cuda.h. Triton's LLVM backend compiles the GPU kernel itself; gcc is only for the host launcher.

What changed

  • eval/Dockerfile.scoring: keep the runtime CUDA base (smaller). Install build-essential. Set ENV CC=gcc CXX=g++ CUDAHOSTCXX=g++. Build-time test -x /usr/bin/gcc and gcc --version on a clean PATH.
    • Size tradeoff: build-essential is ~200MB vs switching to nvidia/cuda:12.8.1-devel-ubuntu24.04 (several GB of nvcc + CUDA headers). If a later kernel compile fails on missing cuda.h, switch BASE_IMAGE to the matching devel digest — do not invent a sha256.
  • eval/src/proof_eval/harness.py: score-neutral belt-and-suspenders: set CC/CXX/CUDAHOSTCXX when unset (harvest SSH may drop Docker ENV). Does not disable flash/SDPA or torch.compile — that would change tokens/sec and possibly NLL.
  • eval/README.md: scoring image requires a C compiler for Triton.
  • publish-proof-eval-image: after pull, assert gcc/g++ exist and CC=gcc.
  • baked_proxies.json stays []. No HF bake, secrets, or holdouts. Fabric selftest / proof-eval entrypoint unchanged.

Operator: republish + re-pin

This PR does not bump config/proof-pin.toml. Do not invent a digest.

  1. Merge (or let publish-proof-eval-image run on this cursor/** branch — it builds eval/Dockerfile.scoring).
  2. Wait for publish-proof-eval-image to finish green.
  3. Copy the scoring digest from the job summary (eval_image_digest = "sha256:…").
  4. Bump eval_image_digest (and the pin comment / proof_git_sha) in config/proof-pin.toml to that published digest.
  5. Until the pin moves, live harvest still boots the old image without gcc.

Empty digest stays fail-closed (503). A pin + can_score is not proof of scientific reproduction.

Test plan

  • pytest eval/tests (contract + new CC helper tests)
  • publish-proof-eval-image on this branch: digest pull, gcc present, CC=gcc, empty baked_proxies, proof-eval selftest
  • After merge + pin bump: live 1× GPU score prints PROOF_EVAL_OK

Rust fmt/clippy/xtask gates are not in scope (eval image + workflow only).

Risk

Live Proof scoring image only. No BASE_* rename, no emission/consensus change, no invented sha256. Next live rent still 503 until operators republish and re-pin.

Naming

I did not rename BASE_* environment variables, deployed host paths, GHCR package names, or base-*-v1 cryptographic domain tags.

Open in Web Open in Cursor 

Triton needs gcc on first CUDA kernel compile after Qwen weight load.
Stay on the runtime CUDA base and add build-essential instead of devel.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
@echobt
echobt marked this pull request as ready for review September 8, 2026 09:36
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This update adds host C/C++ compiler support to the proof scoring image, restores compiler environment variables when absent, and adds checks and documentation for Triton kernel compilation.

T-Rex validation blocked

The complete CUDA-enabled scoring-image build did not finish before the execution limit while runtime packages were installing. No built image was available for the planned in-container compiler and stripped-environment assertions.

Confidence Score: 5/5

No validated defects require changes before merging.

No severity-bearing findings were established.

Files Needing Attention: No files require changes based on the completed validation.

T-Rex T-Rex Logs

What T-Rex did

    • The team attempted to validate the host compiler by running the planned Docker build and image-inspection steps, reported a successful build-essential installation, and noted a reduced-runtime build failure; in-image executable checks could not be collected because the execution limit expired.
    • A follow-up run captured the full build output before timeout, observed a WITH_RUNTIME=0 failure, and documented that environmental budget constraints prevented safe collection of in-image executable proofs during the CUDA runtime installation.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(eval): install host cc for triton ji..." | Re-trigger Greptile

@echobt
echobt merged commit 424fb12 into main Sep 8, 2026
7 checks passed
@echobt
echobt deleted the cursor/proof-eval-triton-cc-bb1c branch September 8, 2026 09:44
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
Live 1x BYOK harvest after #239 still refused PROOF_EVAL_OK: gcc
works, but Triton's nvidia/driver.c fails on missing Python.h.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
Live 1x BYOK harvest after #239 still refused PROOF_EVAL_OK: gcc
works, but Triton's nvidia/driver.c fails on missing Python.h.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
echobt added a commit that referenced this pull request Sep 8, 2026
Live 1x BYOK harvest after #239 still refused PROOF_EVAL_OK: gcc
works, but Triton's nvidia/driver.c fails on missing Python.h.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Mathis <echobt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants