Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

optimize=True crashes on the first generate() when no C compiler is installed (fallback in optimize() never triggers)

Open Beginner friendly
#419 0 comments 0 reactions 0 assignees View on GitHub

@viwe-monai is already working on this.

Since Oct 24, 2026.

  • #440 by @viwe-monai — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, pytorch

Research direction

Read src/voxcpm/model/voxcpm.py and src/voxcpm/model/voxcpm2.py, focusing on optimize() and its existing Triton check and eager fallback. The reproduction in the issue shows the failure on the first compiled function call when no C compiler is available. Confirm the fallback handles that environment and emits a warning; both model paths should run in eager mode without the compiler error.

Written by the indexing model from the issue text.

Description

What happens

With the default optimize=True, on a machine that has Triton but no C compiler (for example a pytorch/pytorch:2.9.1-cuda12.8-cudnn9-runtime based image), optimize() returns without any warning and the first generation fails:

torch._inductor.exc.InductorError: RuntimeError: Failed to find C compiler. Please specify via CC environment variable or set triton.knobs.build.impl.

With VoxCPM.from_pretrained(...) this happens during the warm-up generate() in __init__.

Why

optimize() in src/voxcpm/model/voxcpm.py and voxcpm2.py wraps torch.compile(...) in try/except and falls back to eager mode on error. torch.compile does not compile at that point, though; Triton builds its launcher (and looks for $CC / gcc / clang) on the first call of the compiled function, which is outside the try block, so the fallback never runs.

Reproduction (torch 2.9.1+cu128, triton 3.5.1, voxcpm 2.0.3, PATH without gcc/clang and no CC):

import types, torch, torch.nn as nn
from voxcpm.model.voxcpm2 import VoxCPM2Model

class Lm(nn.Module):
    def __init__(self):
        super().__init__(); self.l = nn.Linear(16, 16)
    def forward_step(self, x):
        return torch.relu(self.l(x))

m = types.SimpleNamespace(device="cuda", base_lm=Lm().cuda(), residual_lm=Lm().cuda(),
                          feat_encoder=nn.Linear(16, 16).cuda(),
                          feat_decoder=types.SimpleNamespace(estimator=nn.Linear(16, 16).cuda()))
VoxCPM2Model.optimize(m)                      # no warning printed
m.feat_encoder(torch.randn(4, 16, device="cuda"))
# InductorError: RuntimeError: Failed to find C compiler. ...

With gcc on PATH the same code runs. Workarounds today are installing a compiler or passing optimize=False; neither is mentioned in the FAQ's torch.compile section.

Suggested fix

Check for a compiler next to the existing import triton check in optimize(), so the existing fallback path prints a warning and runs eager. I have a small PR ready for this.

Environment: Linux, Python 3.11, torch 2.9.1+cu128, triton 3.5.1, voxcpm 2.0.3 (the optimize() code is the same on main).

This report was drafted with AI assistance and reviewed by me.

Dominant language
Python
Stars
39.8k
Forks
4.5k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenBMB/VoxCPM

All issues in OpenBMB/VoxCPM

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.