Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions crates/weaver-spu/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,7 @@ use std::path::PathBuf;

fn main() -> Result<(), Box<dyn std::error::Error>> {
if std::env::var("CARGO_FEATURE_CUDA").is_ok() {
// The `cuda` feature gates the legacy cudarc-based decoder path
// (slated for retirement in Phase 3 cleanup per Cargo.toml). The
// hand-written CUDA kernels for that path live at
// `kernels/transformer.cu`; they were lost in the PR-0.5.E
// shell-crate consolidation. Skip the compile gracefully when
// the file is absent so `--features inference` builds aren't
// broken on main pending a separate kernel-restore PR.
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR")
.expect("CARGO_MANIFEST_DIR not set");
let kernel = PathBuf::from(&manifest_dir).join("kernels/transformer.cu");
if kernel.exists() {
compile_cuda_kernels();
} else {
println!(
"cargo:warning=weaver-spu: skipping CUDA kernel compile — \
kernels/transformer.cu absent (pre-existing regression \
from PR-0.5.E; cudarc decoder path will fail at link \
if its symbols are referenced)"
);
// Still emit the rerun-if-changed so a future kernel restore
// triggers a rebuild.
println!("cargo:rerun-if-changed=kernels/transformer.cu");
}
compile_cuda_kernels();
}
// Persephone proto is always compiled — `encoder::grpc_client_legacy`
// is the production embedder backend during the migration window
Expand Down
Loading