Stage Config#
-
struct PortSpec#
One output of a stage.
-
struct InputSpec#
One input of a stage.
-
struct SourceRef#
A parsed
from. Exactly one of the two forms is valid.Public Functions
-
std::string str() const#
Round-trips back to the original string. Used in diagnostics.
-
std::string str() const#
-
struct StageConfig#
Public Functions
Public Members
-
std::string id#
Unique.
-
std::string artifact#
Engine directory, relative to the config root. May be empty.
-
StageKind kind = {StageKind::kHost}#
-
int32_t maxBatch = {1}#
-
int32_t maxSeq = {0}#
-
int32_t streamLane = {0}#
-
nlohmann::json config = nlohmann::json::object()#
Validated by the runner’s own schema, not here. An empty object rather than a null: a stage that names no options has no options, and every runner reads this with value(), which throws on a null.
-
std::string id#
-
struct MultiStageConfig#
The topology, as data.
A MultiStageConfig is the whole topology: which stages exist, what each one emits, and which port feeds which input. It is parsed from
multistage_config.jsonand is pure data – no callables, and no path that escapes the config root.Nothing here knows about a model family. A family is a set of values in this structure, not a branch in the code.
Public Functions
-
StageConfig const *findStage(std::string const &id) const#
-
int32_t stageIndex(std::string const &id) const#
-1 when absent.
Public Members
-
int32_t schemaVersion = {kSchemaVersion}#
-
std::string label#
Diagnostics only. Never dispatched on.
-
std::vector<StageConfig> stages#
Public Static Functions
-
static MultiStageConfig parse(nlohmann::json const &root)#
Parses and validates. Throws std::runtime_error naming the offending id on any failure.
-
static MultiStageConfig load(std::string const &configRoot)#
Reads <configRoot>/multistage_config.json.
Public Static Attributes
-
static constexpr int32_t kSchemaVersion = 1#
-
StageConfig const *findStage(std::string const &id) const#
Warning
doxygenfunction: Unable to resolve function “trt_edgellm::rt::multiStage::toString” with arguments None in doxygen xml output for project “TensorRT Edge-LLM” from directory: ../cpp_docs/xml. Potential matches:
- char const *toString(FinishReason v)
- char const *toString(OnMissing v)
- char const *toString(PortKind v)
- char const *toString(StageKind v)
- char const *toString(StageStatus v)
- char const *toString(Transport v)
- StageKind trt_edgellm::rt::multiStage::parseStageKind(
- std::string const &v
- PortKind trt_edgellm::rt::multiStage::parsePortKind(
- std::string const &v
- Transport trt_edgellm::rt::multiStage::parseTransport(
- std::string const &v
- OnMissing trt_edgellm::rt::multiStage::parseOnMissing(
- std::string const &v
- SourceRef trt_edgellm::rt::multiStage::parseSourceRef(
- std::string const &from
Parses “<stageId>:<portId>” or “request:<field>”. Throws on a malformed string.
- void trt_edgellm::rt::multiStage::validate(
- MultiStageConfig const &config,
- std::string const &configRoot = {}
Structural checks that must hold before anything is constructed.
Every rule here is one a layering bug could otherwise turn into a runtime surprise. This is the authority at load; the Python builder runs its own, separate preflight before it writes a config.
- Parameters:
config – Parsed topology.
configRoot – Used only to reject an
artifactthat escapes the root. Pass an empty string to skip the filesystem check.
- Throws:
std::runtime_error – naming the stage, the input and the rule.