TypeMapper

Handles type system mapping between SKaiNET and MLIR types.

This class provides conversion utilities for mapping SKaiNET data types and tensor specifications to their corresponding MLIR representations.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Check if two types are compatible for operations

Link copied to clipboard

Create a dynamic tensor type (with unknown dimensions)

Link copied to clipboard
fun createTensorType(shape: List<Int>, dtype: String): String

Create a tensor type string with explicit shape

Link copied to clipboard

Get the MLIR type for a scalar constant of the given dtype

Link copied to clipboard

Infer broadcast type for two tensor specs

Link copied to clipboard
fun mapDType(dtype: String): String

Map SKaiNET data type string to MLIR element type

Link copied to clipboard

Map function signature with inputs and outputs

Link copied to clipboard

Map a TensorSpec to MLIR tensor type string