Class JitnnNDManager

java.lang.Object
ai.djl.ndarray.BaseNDManager
ai.beestream.jitnn.djl.JitnnNDManager
All Implemented Interfaces:
ai.djl.ndarray.NDManager, AutoCloseable

public class JitnnNDManager extends ai.djl.ndarray.BaseNDManager
Creates JitnnNDArrays. Every numeric DJL type is held in an FP32 jitNN tensor (exact for integers up to 2^24) tagged with its DJL type, which arithmetic results and host copies follow; operators that take indices convert to INT32 on the device.
  • Nested Class Summary

    Nested classes/interfaces inherited from class ai.djl.ndarray.BaseNDManager

    ai.djl.ndarray.BaseNDManager.TempResource

    Nested classes/interfaces inherited from interface ai.djl.ndarray.NDManager

    ai.djl.ndarray.NDManager.SystemNDManager
  • Field Summary

    Fields inherited from class ai.djl.ndarray.BaseNDManager

    alternativeManager, capped, closed, device, name, parent, resources, tempResources, uid

    Fields inherited from interface ai.djl.ndarray.NDManager

    UID_GENERATOR
  • Method Summary

    Modifier and Type
    Method
    Description
    allocateDirect(int capacity)
     
    arange(float start, float stop, float step, ai.djl.ndarray.types.DataType dataType)
     
    create(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    create(Buffer data, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    eye(int rows, int cols, int k, ai.djl.ndarray.types.DataType dataType)
     
    from(ai.djl.ndarray.NDArray array)
     
    full(ai.djl.ndarray.types.Shape shape, float value, ai.djl.ndarray.types.DataType dataType)
     
    ai.djl.engine.Engine
     
    linspace(float start, float stop, int num, boolean endpoint)
     
    ai.djl.ndarray.NDManager
    newSubManager(ai.djl.Device device)
     
    ones(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    randomInteger(long low, long high, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    randomNormal(float loc, float scale, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
     
    randomUniform(float low, float high, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    truncatedNormal(float loc, float scale, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     
    wrap(Tensor tensor, ai.djl.ndarray.types.DataType dataType)
    Wraps a jitNN tensor as an array of this manager.
    zeros(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
     

    Methods inherited from class ai.djl.ndarray.BaseNDManager

    attachInternal, attachUncappedInternal, cap, close, copyBuffer, create, createCoo, createCSR, createRowSparse, debugDump, defaultDevice, detachInternal, getDevice, getManagedArrays, getName, getParentManager, invoke, invoke, isOpen, load, newSubManager, randomMultinomial, randomMultinomial, sampleGamma, sampleGamma, sampleNormal, sampleNormal, samplePoisson, samplePoisson, setName, tempAttachInternal, toString, validateBuffer

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ai.djl.ndarray.NDManager

    arange, arange, arange, arange, arange, arange, arange, arange, attachAll, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createCSR, createCSR, createRowSparse, decode, decode, eye, eye, eye, eye, full, full, full, hanningWindow, linspace, linspace, linspace, linspace, load, ones, ones, randomNormal, randomNormal, randomNormal, randomUniform, randomUniform, ret, tempAttachAll, truncatedNormal, truncatedNormal, truncatedNormal, zeros, zeros
  • Method Details

    • getEngine

      public ai.djl.engine.Engine getEngine()
    • allocateDirect

      public ByteBuffer allocateDirect(int capacity)
    • from

      public JitnnNDArray from(ai.djl.ndarray.NDArray array)
    • newSubManager

      public ai.djl.ndarray.NDManager newSubManager(ai.djl.Device device)
    • wrap

      public JitnnNDArray wrap(Tensor tensor, ai.djl.ndarray.types.DataType dataType)
      Wraps a jitNN tensor as an array of this manager.
    • create

      public JitnnNDArray create(Buffer data, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
    • create

      public JitnnNDArray create(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      create in interface ai.djl.ndarray.NDManager
      Overrides:
      create in class ai.djl.ndarray.BaseNDManager
    • zeros

      public JitnnNDArray zeros(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
    • ones

      public JitnnNDArray ones(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
    • full

      public JitnnNDArray full(ai.djl.ndarray.types.Shape shape, float value, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      full in interface ai.djl.ndarray.NDManager
      Overrides:
      full in class ai.djl.ndarray.BaseNDManager
    • arange

      public JitnnNDArray arange(float start, float stop, float step, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      arange in interface ai.djl.ndarray.NDManager
      Overrides:
      arange in class ai.djl.ndarray.BaseNDManager
    • eye

      public JitnnNDArray eye(int rows, int cols, int k, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      eye in interface ai.djl.ndarray.NDManager
      Overrides:
      eye in class ai.djl.ndarray.BaseNDManager
    • linspace

      public JitnnNDArray linspace(float start, float stop, int num, boolean endpoint)
      Specified by:
      linspace in interface ai.djl.ndarray.NDManager
      Overrides:
      linspace in class ai.djl.ndarray.BaseNDManager
    • randomUniform

      public JitnnNDArray randomUniform(float low, float high, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      randomUniform in interface ai.djl.ndarray.NDManager
      Overrides:
      randomUniform in class ai.djl.ndarray.BaseNDManager
    • randomNormal

      public JitnnNDArray randomNormal(float loc, float scale, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      randomNormal in interface ai.djl.ndarray.NDManager
      Overrides:
      randomNormal in class ai.djl.ndarray.BaseNDManager
    • truncatedNormal

      public JitnnNDArray truncatedNormal(float loc, float scale, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      truncatedNormal in interface ai.djl.ndarray.NDManager
      Overrides:
      truncatedNormal in class ai.djl.ndarray.BaseNDManager
    • randomInteger

      public JitnnNDArray randomInteger(long low, long high, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      Specified by:
      randomInteger in interface ai.djl.ndarray.NDManager
      Overrides:
      randomInteger in class ai.djl.ndarray.BaseNDManager
    • randomPermutation

      public JitnnNDArray randomPermutation(long n)
      Specified by:
      randomPermutation in interface ai.djl.ndarray.NDManager
      Overrides:
      randomPermutation in class ai.djl.ndarray.BaseNDManager