Interface GpuRuntime


public interface GpuRuntime
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    allocBuffers(int[] ids, int[] sizes, int count)
     
    default void
    allocTypedBuffers(int[] ids, int[] sizes, DType[] dtypes, int count)
    Physical element counts and dtypes, independent of logical Tensor shape.
    void
    downloadBuffer(int bufId, float[] out)
     
    default void
    downloadBuffer16(int bufId, short[] out)
     
    void
    flushOps(int[] cmdStream, int cmdStreamLength)
     
    default void
    flushOps(int[] commands, int length, long[] layouts)
     
    void
    releaseBuffers(int[] ids, int count)
     
    default boolean
     
    void
    uploadBuffer(int bufId, float[] data)
     
    default void
    uploadBuffer16(int bufId, short[] data)
     
    default void
    zeroBuffer(int bufId, int floatCount)
    Initializes the whole buffer with positive zero; custom runtimes retain a portable fallback.
    default void
    zeroBuffer(int bufId, int elements, DType dtype)
     
  • Method Details

    • supportsLayouts

      default boolean supportsLayouts()
    • allocBuffers

      void allocBuffers(int[] ids, int[] sizes, int count)
    • allocTypedBuffers

      default void allocTypedBuffers(int[] ids, int[] sizes, DType[] dtypes, int count)
      Physical element counts and dtypes, independent of logical Tensor shape.
    • uploadBuffer

      void uploadBuffer(int bufId, float[] data)
    • uploadBuffer16

      default void uploadBuffer16(int bufId, short[] data)
    • zeroBuffer

      default void zeroBuffer(int bufId, int floatCount)
      Initializes the whole buffer with positive zero; custom runtimes retain a portable fallback.
    • downloadBuffer

      void downloadBuffer(int bufId, float[] out)
    • downloadBuffer16

      default void downloadBuffer16(int bufId, short[] out)
    • zeroBuffer

      default void zeroBuffer(int bufId, int elements, DType dtype)
    • releaseBuffers

      void releaseBuffers(int[] ids, int count)
    • flushOps

      void flushOps(int[] cmdStream, int cmdStreamLength)
    • flushOps

      default void flushOps(int[] commands, int length, long[] layouts)