fork: add hydra-dev CMake preset + forward-decl for hydra_rpc_bridge#38
Merged
Merged
Conversation
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>
6 tasks
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.
Summary
Two small changes that unblock fast local fork iteration:
CMakePresets.json(+18 LOC): newhydra-devpreset —same
86;120fat-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 resolvesymbols 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.
tools/server/server-context.cpp(+5 LOC): doc-comment +forward-declaration for the
extern "C" hydra_rpc_bridgetrampoline. 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
touched, no flag defaults changed, no other CMake code affected.
definition immediately follows). It's a documentation
improvement, not a behavior change.
deletions.
Cherry-pick vs net-new
CMakePresets.json: net-new (no upstream equivalent).server-context.cpp: the forward-declaration is new (PR fork: Phase 1 — merged Hydra RPC server in tools/llama-engine/hydra_rpc/ #37added the function definition but did not add a forward-decl;
this is the missing piece for the new module to take the
function's address without including server-context.h).
Cross-repo
documents the preset in
DevelopmentRunBook.mdanddocs/build-environment.md)push-before-PR rule in the parent repo's 02-implement.md)
Test plan
cmake --preset hydra-dev -DCUDAToolkit_ROOT=/opt/software/cuda/13.2 -DCMAKE_CUDA_COMPILER=/opt/software/cuda/13.2/bin/nvccconfigures successfullycmake --build build-hydra-dev --target llama-engine -j$(nproc)builds cleanlyccache -sshows cache hits incrementing across rebuildstools/llama-engine/hydra_rpc/hydra_rpc.cppmodule cantake
&hydra_rpc_bridgewithout includingserver-context.h)
hydra-forkbuild job)