NativeKernels class final
Process-wide settings of the native kernels.
Properties
- attention → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- int8Inputs → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- threads → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NativeKernels
-
no setter
- isAvailable → bool
-
Whether the kernels can be called: built for this platform by the
build hook (or already opened from a path), and this CPU has the int8
dot product they are compiled for. Check it before anything else of
the library runs: without the dot product, the kernels stop the app on
an illegal instruction.
no setter
- isLoaded → bool
-
no setter
Static Methods
-
allocate<
T extends NativeType> (int bytes) → Pointer< T> -
load(
String? path, {int threads = 4, bool int8Inputs = true, bool attention = true}) → void -
Enables the kernels: those the package's build hook compiled, or with
paththe library there (for kernels built outside the package).threadsnative threads share each product;int8Inputsselects the sdot path;attentionmoves attention to C (see nativeAttention).