52 std::map<std::string, ShapeProfile>
shapes;
67 std::map<std::string, EngineProfile>
engines;
96 [[nodiscard]] std::string
to_json()
const;
99 [[nodiscard]] std::optional<EngineProfile>
100 find(
const std::string &engine_name)
const;
126std::optional<std::string>
std::optional< std::string > profile_shape_conflict(const std::vector< long long > &network_dims, const EngineProfile::ShapeProfile &profile)
Why an optimization profile cannot apply to a network input whose dims are network_dims (-1 = dynamic...
std::optional< EngineProfile > text_only_fallback(const std::string &engine_name, const EngineProfile &profile)
The text-only fallback for an engine whose geometry-prompt profile cannot be built: an export that ba...
bool is_shape_build_error(const std::vector< std::string > &builder_errors)
Whether a failed TensorRT build's error messages point at the profile's shapes (a dimension,...
constexpr int kGeometryTraceBoxes
The box count the in-repo exporter traces the geometry encoder at (export_detector....
The full set of per-engine build recipes.
std::optional< EngineProfile > find(const std::string &engine_name) const
Look up one engine's recipe, or std::nullopt if absent.
std::map< std::string, EngineProfile > engines
std::string to_json() const
Serialize back to engine-build.json form (no _comment).
std::vector< std::string > fallback_engines
Only in an engine directory's stamp: the engines that were built with text_only_fallback() instead of...
static EngineBuildProfiles from_file(const std::filesystem::path &path)
Parse engine-build.json from disk.
int recipe_version
Revision of the recipe's contents (recipe_version, absent ⟹ 1).
static EngineBuildProfiles from_string(const std::string &json_text)
Parse from an in-memory JSON string (used by tests).
static const EngineBuildProfiles & builtin()
The canonical recipe (python/reusex_sam3/engine-build.json) embedded at build time.
std::map< std::string, std::string > fallback_onnx_sha256
Only in a stamp, next to fallback_engines: the sha256 of each fallback engine's ONNX at the time its ...
Min / opt / max dimensions for one dynamic (or static) input tensor.
bool operator==(const ShapeProfile &) const =default
Per-engine TensorRT build recipe, deserialized from engine-build.json.
std::string precision
"fp16" or "fp32".
std::map< std::string, ShapeProfile > shapes
Optimization-profile shapes, keyed by input tensor name.
bool operator==(const EngineProfile &) const =default
int workspace_mb
trtexec / IBuilderConfig workspace memory pool, in MiB.