ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::vision::sam3::EngineProfile Struct Reference

Per-engine TensorRT build recipe, deserialized from engine-build.json. More...

#include <EngineBuildProfiles.hpp>

Collaboration diagram for reusex::vision::sam3::EngineProfile:

Classes

struct  ShapeProfile
 Min / opt / max dimensions for one dynamic (or static) input tensor. More...

Public Member Functions

bool operator== (const EngineProfile &) const =default
bool is_fp16 () const
bool is_fp32 () const

Public Attributes

std::string precision = "fp16"
 "fp16" or "fp32".
int workspace_mb = 8192
 trtexec / IBuilderConfig workspace memory pool, in MiB.
std::map< std::string, ShapeProfile > shapes
 Optimization-profile shapes, keyed by input tensor name.

Detailed Description

Per-engine TensorRT build recipe, deserialized from engine-build.json.

engine-build.json is the SINGLE SOURCE OF TRUTH for how each SAM 3.1 ONNX graph is turned into a TensorRT engine. It is emitted by the Python export pipeline (python/reusex_sam3/build_engines.py) and shipped in the model bundle next to the *.onnx files. Both the Python trtexec driver and the native C++ EngineBuilder read it, so the two can never drift.

The recipe here is already fully resolved — the fp32-vision-encoder rule and its batch-1/workspace overrides (see build_engines.py FP32_ENGINES / FP32_SHAPE_OVERRIDES / FP32_WORKSPACE_MB) are baked into precision, shapes and workspace_mb by the emitter, so the consumer applies the values verbatim with no special cases.

This header is backend-agnostic (no NvInfer include), so it compiles in CPU-only builds; the NvInfer-dependent consumer lives in vision/tensor_rt/common/EngineBuilder.hpp.

Definition at line 33 of file EngineBuildProfiles.hpp.

Member Function Documentation

◆ is_fp16()

bool reusex::vision::sam3::EngineProfile::is_fp16 ( ) const
inlinenodiscard

Definition at line 56 of file EngineBuildProfiles.hpp.

References precision.

◆ is_fp32()

bool reusex::vision::sam3::EngineProfile::is_fp32 ( ) const
inlinenodiscard

Definition at line 57 of file EngineBuildProfiles.hpp.

References precision.

◆ operator==()

bool reusex::vision::sam3::EngineProfile::operator== ( const EngineProfile & ) const
default

Member Data Documentation

◆ precision

std::string reusex::vision::sam3::EngineProfile::precision = "fp16"

"fp16" or "fp32".

The bf16-native vision-encoder MUST be "fp32": fp16 silently corrupts its ViT-L trunk into all-background output.

Definition at line 45 of file EngineBuildProfiles.hpp.

Referenced by is_fp16(), and is_fp32().

◆ shapes

std::map<std::string, ShapeProfile> reusex::vision::sam3::EngineProfile::shapes

Optimization-profile shapes, keyed by input tensor name.

Empty for a fully static engine.

Definition at line 52 of file EngineBuildProfiles.hpp.

◆ workspace_mb

int reusex::vision::sam3::EngineProfile::workspace_mb = 8192

trtexec / IBuilderConfig workspace memory pool, in MiB.

Definition at line 48 of file EngineBuildProfiles.hpp.


The documentation for this struct was generated from the following file: