fix(tensorrt): fail fast when tensorrt-link is enabled until shim lands#7
Merged
Conversation
The `tensorrt-link` feature emits link directives for the `atomr_trt_*` C-ABI shim symbols declared in `sys.rs`, but the C++ source defining them (`nvinfer_shim.cpp`) has not been committed. Any consumer enabling the feature today hit an opaque "undefined reference" linker error against libnvinfer with no actionable signal. Until the shim lands (tracked in #6), gate the feature with a `compile_error!` in `lib.rs` that names the issue, short-circuit `build.rs` to skip the now-misleading libnvinfer probe panic, and update Cargo manifests + docs (features-matrix, gpu-testing, SKILL) to point at #6 so downstream consumers reading the surface understand the disabled state. The probe helpers and `#[cfg]` call sites are preserved so re-enabling the feature in the shim PR is a one-line change. Refs #6 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sibling atomr workspace was bumped to 0.7.0; this updates the path deps to match. No code changes — pin refresh only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
tensorrt-linkfeature onatomr-accel-tensorrt(and itsatomr-accel-pypassthrough) emits link directives foratomr_trt_*C-ABI shim symbols declared incrates/atomr-accel-tensorrt/src/sys.rs:170-277, but the C++ source defining them (nvinfer_shim.cpp) has not been committed. Enabling the feature today produces an opaqueundefined referencelinker error and there is no workaround a consumer can apply (see tensorrt-link feature emits link directives for symbols that have no source file #6).compile_error!incrates/atomr-accel-tensorrt/src/lib.rspointing at tensorrt-link feature emits link directives for symbols that have no source file #6, short-circuitscrates/atomr-accel-tensorrt/build.rsso users with the feature on but no libnvinfer don't see the now-misleadingset LIBNVINFER_PATHpanic, and annotates the Cargo manifests + user-facing docs (features-matrix, gpu-testing, SKILL) so downstream readers understand the disabled state.#[cfg(feature = "tensorrt-link")]call sites inactor.rs/engine.rs/runtime.rs/onnx.rs/plugin.rsare untouched, and thebuild.rsprobe helpers are kept under#[allow(dead_code)]. Re-enabling the link path in the shim PR is removing thecompile_error!and the no-op short-circuit inbuild.rs.Refs #6 — keep open so the issue closes when the shim itself lands, not when this guard merges.
Test plan
cargo check -p atomr-accel-tensorrt(default features) — passescargo check -p atomr-accel-tensorrt --features tensorrt-link— fails with the newcompile_error!referencing tensorrt-link feature emits link directives for symbols that have no source file #6cargo check -p atomr-accel-py --features tensorrt-link— samecompile_error!propagates through the passthroughcargo check --workspace— greencargo test -p atomr-accel-tensorrt --lib— all 10 unit tests pass🤖 Generated with Claude Code