|
InfiniOps
Operator Library for Accelerators
|
This page summarizes the core types used by InfiniOps operators. InfiniOps reuses the public InfiniRT runtime types where possible.
infini::ops::Tensor is an alias for infini::rt::TensorView.
Tensor is a non-owning view. It stores the data pointer, shape, data type, device, and strides, but it does not own the memory it references.
infini::ops::Device is an alias for infini::rt::Device.
Known device types include:
Device::Type::kCpuDevice::Type::kNvidiaDevice::Type::kIluvatarDevice::Type::kMetaxDevice::Type::kMooreDevice::Type::kHygonDevice::Type::kCambriconDevice::Type::kAscendSome source code also carries experimental or future device enum values. Treat documented build options in Backends as the supported user surface.
infini::ops::DataType is imported from InfiniRT. Common values include:
DataType::kInt8, DataType::kInt16, DataType::kInt32, DataType::kInt64DataType::kUInt8, DataType::kUInt16, DataType::kUInt32, DataType::kUInt64DataType::kFloat16, DataType::kBFloat16, DataType::kFloat32, DataType::kFloat64DataType::kBool (distinct from kUInt8, with one byte per element)InfiniOps also exposes type-list helpers such as FloatTypes, ReducedFloatTypes, IntTypes, UIntTypes, and AllTypes for template dispatch.
Handle carries optional runtime resources for a call:
Operators that need temporary memory read the workspace from the handle. Callers that do not need custom stream or workspace handling can use the shorter Op::Call(...) form without an explicit handle.
Config carries operator configuration that is independent of tensor geometry. The most common field is implementation_index, which selects one of the active implementations for an operator and device.
Use the default config unless a specific backend implementation needs to be selected deliberately.