Skip to content

fix: ship kernel headers in wheels so @Thread works after pip (0.2.1) - #29

Merged
K-T0BIAS merged 1 commit into
mainfrom
runtime-compile-path-hotfix-for-v0.2.1
Sep 19, 2026
Merged

K-T0BIAS merged 1 commit into
mainfrom
runtime-compile-path-hotfix-for-v0.2.1

Conversation

@K-T0BIAS

Copy link
Copy Markdown
Owner

Summary

  • Bug: pip install cthreads / cthreads-gpu (0.2.0) could not compile
    @Thread kernels, shared_host.hpp was never in the wheel. Editable
    checkouts still worked, so CI/local hid it; Colab exposed it.
  • Fix: CMake installs cpp/headers + runtime/sync_bridge.cpp into
    cthreads/_native/. build.py prefers that layout, then monorepo cpp/,
    and raises if neither exists (no silent skip).
  • Release: bump project.version to 0.2.1 (CPU + GPU wheels share it).

Why this is real (not a Colab quirk)

Generated kernels always #include "shared_host.hpp". Old build.py only
looked at …/cpp/headers relative to the monorepo layout and did
if dir.exists(): add include. On a wheel that path is absent ->include
omitted -> cryptic missing-header compile error. Details:
docs/internals/kernel_build_headers.md (if present on branch) / this PR diff.

PyPI 0.2.0 installs could not JIT @thread: shared_host.hpp lived only in the
monorepo cpp/ tree and build.py skipped missing includes silently. Bundle
headers + sync_bridge under cthreads/_native, resolve that path first, and
fail loud if neither layout exists. Add unit/integration regression tests.
@K-T0BIAS K-T0BIAS self-assigned this Sep 19, 2026
@K-T0BIAS K-T0BIAS added the bug Something isn't working label Sep 19, 2026
@K-T0BIAS
K-T0BIAS merged commit ca6fcb5 into main Sep 19, 2026
4 checks passed
@K-T0BIAS
K-T0BIAS deleted the runtime-compile-path-hotfix-for-v0.2.1 branch September 19, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants