Safety LLM Shape Utils#

nvinfer1::Dims trt_edgellm::safety::builder::getSafetyLLMInputShape(
std::string_view name,
nvinfer1::Dims const &exportedShape,
SafetyLLMStaticShapeProfile const &profile,
int64_t hiddenSize,
int64_t numKVHeads,
int64_t headSize,
int64_t rotaryDim
)#

Resolve a batched, contiguous-KV input shape and check its exported rank and fixed dimensions. Throws std::invalid_argument for unsupported inputs or incompatible model/profile dimensions.