Package-level declarations

Types

Link copied to clipboard
object BF16 : DType

Brain Float 16 (BFloat16) type. 16-bit floating point format with same exponent range as FP32 but reduced mantissa. Commonly used in machine learning workloads.

Link copied to clipboard
sealed interface DType
Link copied to clipboard
object FP16 : DType
Link copied to clipboard
object FP32 : DType
Link copied to clipboard
object FP64 : DType

64-bit floating point type (Double precision). Highest precision floating point type in SKaiNET.

Link copied to clipboard
object Int16 : DType

16-bit signed integer type.

Link copied to clipboard
object Int32 : DType
Link copied to clipboard
object Int4 : DType
Link copied to clipboard
object Int64 : DType

64-bit signed integer type (Long).

Link copied to clipboard
object Int8 : DType
Link copied to clipboard
object Ternary : DType

Custom data type holding 3 values -1,0,1 stored in 2 bits. Used e.g. with BitNet models https://huggingface.co/microsoft/bitnet-b1.58-2B-4T

Link copied to clipboard
object TypeUtils

Utility functions and extensions for the DType type system.

Link copied to clipboard
object UInt16 : DType

16-bit unsigned integer type.

Link copied to clipboard
object UInt32 : DType

32-bit unsigned integer type.

Link copied to clipboard
object UInt64 : DType

64-bit unsigned integer type.

Link copied to clipboard
object UInt8 : DType

8-bit unsigned integer type.

Functions

Link copied to clipboard

Returns the common precision type for mixed operations

Link copied to clipboard

Checks if conversion between two DTypes is supported at compile time

Link copied to clipboard
fun isValidPrecisionChain(precisionChain: List<DType>): Boolean

Checks if a precision chain is valid (e.g., for multi-stage networks).

Link copied to clipboard
Link copied to clipboard
fun validateCompatibility(source: DType, target: DType)

Validates that two DTypes are compatible for operations.

Link copied to clipboard

Validates that a conversion path exists between two DTypes.

Link copied to clipboard
fun validatePrecisionChain(precisionChain: List<DType>)

Validates an entire precision chain, throwing an exception if invalid.

Link copied to clipboard
fun validatePromotion(type1: DType, type2: DType, expectedResult: DType)

Validates that a promotion between two DTypes will produce the expected result.