tenzr::ExecutionResult¶
Result of executing a graph, holding device-resident buffers plus lazily materialized host storage for its outputs.
#include <execution_engine.h>
Public Functions¶
| Name | |
|---|---|
| void | EnsureHostBuffer() const Materialize the pinned host buffer from the device buffer when not already staged. |
| template <typenameT > std::vector< T > |
ToVector() const |
| Array | AsArray(std::string name ="") const |
| Array | AsTensor(std::string name ="") const Alias for as_array. |
| operator Array() const |
Public Attributes¶
| Name | |
|---|---|
| std::shared_ptr< DeviceBuffer > | device_buffer Device-resident buffer holding the result. |
| std::shared_ptr< PinnedBuffer > | output_buffer |
| Shape | shape |
| DType | dtype |
| constPJRT_Api * | api |
| std::vector< std::shared_ptr< DeviceBuffer > > | device_buffers All device-resident outputs; index 0 mirrors device_buffer. |
| std::vector< Shape > | shapes Shapes of every output; mirrors the executable's out_shapes. |
| std::vector< DType > | dtypes DTypes of every output. |
Public Functions Documentation¶
function EnsureHostBuffer¶
Materialize the pinned host buffer from the device buffer when not already staged.
Lazily copy the device output into a pooled host buffer.
function ToVector¶
Template Parameters:
- T Requested element type; must match the result dtype.
Return: Host vector containing the result elements.
Copy the result into a host std::vector
function AsArray¶
Parameters:
- name Symbolic name for the resulting Array.
- name Name assigned to the produced variable.
Return:
Wrap the result as an Array bound to an optional name. Wrap the result in an Array variable node carrying the device and/or host buffer.
function AsTensor¶
Alias for as_array.
function operator Array¶
Public Attributes Documentation¶
variable device_buffer¶
Device-resident buffer holding the result.
variable output_buffer¶
variable shape¶
variable dtype¶
variable api¶
variable device_buffers¶
All device-resident outputs; index 0 mirrors device_buffer.
variable shapes¶
Shapes of every output; mirrors the executable's out_shapes.
variable dtypes¶
DTypes of every output.