Skip to content

fork: add hydra-dev CMake preset + forward-decl for hydra_rpc_bridge#38

Merged
ddvnguyen merged 1 commit into
hydra-forkfrom
fork/hydra-400-hydra-dev-preset
Jul 8, 2026
Merged

fork: add hydra-dev CMake preset + forward-decl for hydra_rpc_bridge#38
ddvnguyen merged 1 commit into
hydra-forkfrom
fork/hydra-400-hydra-dev-preset

Conversation

@ddvnguyen

Copy link
Copy Markdown
Owner

Summary

Two small changes that unblock fast local fork iteration:

  1. CMakePresets.json (+18 LOC): new hydra-dev preset —
    same 86;120 fat-arch pair and correctness flags
    (CUDA, cuBLAS, FA, RPC, NVML, NATIVE) as the deploy build, but
    skips LTO and wires in ccache for C/C++/CUDA. BUILD_SHARED_LIBS=ON
    so the new tools/llama-engine/hydra_rpc/ module can resolve
    symbols at link time. Cuts a single-file rebuild on the
    sm_86+sm_120 fat build from ~120–180s down to a few seconds once
    ccache is warm.

  2. tools/server/server-context.cpp (+5 LOC): doc-comment +
    forward-declaration for the extern "C" hydra_rpc_bridge
    trampoline. The new tools/llama-engine/hydra_rpc/ module
    (added in PR fork: Phase 1 — merged Hydra RPC server in tools/llama-engine/hydra_rpc/ #37) takes the address of this function and needs
    the declaration visible without dragging in the heavy
    server-context.h header.

Why this is safe

  • The preset addition is purely additive — no existing presets
    touched, no flag defaults changed, no other CMake code affected.
  • The forward-declaration is also purely additive (the function
    definition immediately follows). It's a documentation
    improvement, not a behavior change.
  • Total fork-side delta: 23 insertions across 2 files, no
    deletions.

Cherry-pick vs net-new

Cross-repo

Test plan

  • cmake --preset hydra-dev -DCUDAToolkit_ROOT=/opt/software/cuda/13.2 -DCMAKE_CUDA_COMPILER=/opt/software/cuda/13.2/bin/nvcc configures successfully
  • cmake --build build-hydra-dev --target llama-engine -j$(nproc) builds cleanly
  • ccache -s shows cache hits incrementing across rebuilds
  • The forward-declaration compiles (i.e., the new
    tools/llama-engine/hydra_rpc/hydra_rpc.cpp module can
    take &hydra_rpc_bridge without including
    server-context.h)
  • Fork CI green (hydra-fork build job)

CMakePresets.json: add the `hydra-dev` preset (18 LOC). Same
`86;120` fat-arch pair and correctness flags (CUDA, cuBLAS, FA,
RPC, NVML, NATIVE) as the deploy build, but skips LTO (no IPOPass)
and wires in ccache for C/C++/CUDA. BUILD_SHARED_LIBS=ON so the
hydra_rpc module can resolve symbols at link time. Cuts a
single-file rebuild on the sm_86+sm_120 fat build from ~120-180s
down to a few seconds once the ccache is warm.

tools/server/server-context.cpp: add a 4-line doc-comment +
forward-declaration for the `extern "C" hydra_rpc_bridge`
trampoline. The new tools/llama-engine/hydra_rpc/ module (Phase 1
of #36) takes the address of this function and
needs the declaration visible without dragging in the heavy
server-context.h header.

Refs: ddvnguyen/hydra_vortex#400 (parent PR documenting the preset)
Refs: #36 (v4 design handoff, Phase 1)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

1 participant