Lm Stage Context#

struct SafetyModelLocalResourceView#

A model-local buffer supplied by the declared-resource owner during Initialization.

Public Members

std::string name#
void *data = {nullptr}#
size_t sizeInBytes = {0}#
struct SafetyModelLocalResourceRequirement#

Public Members

std::string name#
size_t minimumBytes = {0}#
struct LMStagePlan#

Logical assignment only; no resource ownership or device handles.

Public Members

std::string id#
ResourceSlotId slot = {0}#
size_t executorIndex = {0}#
std::vector<int64_t> profiles#
std::vector<SafetyModelLocalResourceRequirement> modelLocalResources#
struct LMStageProfileView#

Public Members

SafetyProfileMetadata const *metadata = {nullptr}#
SafetyProfileResources const *resources = {nullptr}#
std::vector<SafetyTensorView> tensors = {}#
struct LMStageContext#

Immutable after readiness. Stage/slot pairs sharing an executor also share its fixed IO storage. Model-local buffers, executor metadata, IO buffers, and streams are non-owning views.

Public Functions

SafetyStatus getTensorView(
int64_t profile,
std::string_view name,
SafetyTensorView const *&output
) const noexcept#

Pure cached lookup; returned metadata borrows the context’s fixed IO storage.

SafetyStatus getTensorView(
std::string_view name,
SafetyTensorView const *&output
) const noexcept#

Name-only lookup requires a singleton profile; it never chooses among multiple admitted profiles.

Public Members

LMStagePlan plan#
cudaStream_t mainStream = {nullptr}#
std::vector<LMStageProfileView> profiles#
std::vector<SafetyModelLocalResourceView> modelLocalResources#
bool complete = {false}#