Skip to main content

apply_eager_with_extension_session

Function apply_eager_with_extension_session 

Source
pub fn apply_eager_with_extension_session(
    op: Arc<dyn ExtensionOp>,
    inputs: &[&EagerTensor],
    module: Arc<dyn ExtensionModule>,
    execute: impl FnOnce(&dyn ExtensionOp, &[TensorRead<'_>], &mut ExtensionExecutionContext<'_, dyn BackendSession + '_>) -> Result<Vec<Tensor>> + Send,
) -> Result<Vec<EagerTensor>>
Expand description

Apply an extension op to eager tensors through a direct prepared-operation callback receiving a non-owning backend session.

This keeps eager extension execution on the extension crate’s semantic implementation without using the retired legacy extension executor.

§Errors

Returns Error::Validation with InvalidArgument when inputs is empty or its length differs from the extension’s declared input count. Returns Error::ContextMismatch when tensors belong to different eager runtimes; backend, extension, and runtime-state failures retain their typed sources.