Enum Class Backend

java.lang.Object
java.lang.Enum<Backend>
ai.beestream.jitnn.Backend
All Implemented Interfaces:
Serializable, Comparable<Backend>, Constable

public enum Backend extends Enum<Backend>
Where operators run.

The default is TORNADO when a TornadoVM runtime is on the class path, else CPU when the JVM has the Vector API module, else REFERENCE; -Djitnn.backend (tornado, cpu or reference) overrides it, and JitnnRuntime.setBackend(Backend) and JitnnRuntime.with(Backend, Supplier) change it per thread.

  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Operators are recorded lazily as on TORNADO; a sync point rewrites the trace with the same fusion pass and runs it on the host, each operator with its multithreaded, vectorised CPU kernel (Java Vector API) or, when it has none, its reference implementation.
    Operators run eagerly on the host with the Java reference implementations.
    Operators are recorded lazily; a sync point compiles everything recorded since the last one into one TornadoVM task graph, caches the compiled plan by the trace's structure, and replays it when the same structure comes back (a training step).
  • Method Summary

    Modifier and Type
    Method
    Description
    static Backend
    Returns the enum constant of this class with the specified name.
    static Backend[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • TORNADO

      public static final Backend TORNADO
      Operators are recorded lazily; a sync point compiles everything recorded since the last one into one TornadoVM task graph, caches the compiled plan by the trace's structure, and replays it when the same structure comes back (a training step).
    • CPU

      public static final Backend CPU
      Operators are recorded lazily as on TORNADO; a sync point rewrites the trace with the same fusion pass and runs it on the host, each operator with its multithreaded, vectorised CPU kernel (Java Vector API) or, when it has none, its reference implementation. It needs no TornadoVM runtime, but the JVM needs --add-modules jdk.incubator.vector.
    • REFERENCE

      public static final Backend REFERENCE
      Operators run eagerly on the host with the Java reference implementations. Tests use it as the oracle; it needs no TornadoVM runtime.
  • Method Details

    • values

      public static Backend[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Backend valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null