Module tornado.api

Class TornadoProfilerResult

java.lang.Object
uk.ac.manchester.tornado.api.TornadoProfilerResult
All Implemented Interfaces:
ProfilerInterface

public class TornadoProfilerResult extends Object implements ProfilerInterface
Object that stores all information related to profiling an executor. To be able to return all timers, developers must enable the profiler from the command line using the option:

--enableProfiler invalid input: '<'console|silent>

Alternatively, the profiler can be enabled using the TornadoExecutionPlan.withProfiler(ProfilerMode).

Since:
0.15
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Dump in STDOUT all metrics associated to an execution.
    long
    Returns the JIT Compilation time for all immutable task-graphs associated to the executor.
    long
    Returns the total time (in ns) that took for all immutable task-graphs to dispatch the command to send and receive data.
    long
    Returns the total data transfer time (in ns) for all immutable task-graphs to perform copies from host to device and device to host.
    long
    Returns the total time (in ns) for all immutable task-graphs to run the kernel.
    long
    Return the total time (in ns) for all immutable task-graphs that took to receive data to the host (device -> host).
    long
    Return the total time for all immutable task-graphs that took to send data to the device (host -> device).
    long
    Returns the compilation time (in ns)that took the device driver (e.g., OpenCL driver) to create the device binary (e.g., from OpenCL C to binary, or from SPIR-V to binary).
    long
    Returns the total time (in ns) that took all kernels to be dispatched by the driver.
    Returns the profiler log in a JSON format for all the tasks within the executor.
    long
    Returns Tornado JIT Compilation time, in ns, (from Java bc to final step in Graal LIR) for all immutable task-graphs associated to the executor.
    long
    Returns the total number of bytes that were transferred to the hardware accelerator (host to device) for the current execution of the execution plan.
    long
    Returns the total number of bytes that were transferred to the host (device to host) for the current execution of the execution plan.
    long
    Return the total number of bytes transferred to/from the target accelerators.
    long
    Return the total number of bytes allocated on the target device.
    long
    Returns the end-to-end time for all immutable task-graph to execute.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getTotalTime

      public long getTotalTime()
      Returns the end-to-end time for all immutable task-graph to execute.
      Specified by:
      getTotalTime in interface ProfilerInterface
      Returns:
      long
    • getCompileTime

      public long getCompileTime()
      Returns the JIT Compilation time for all immutable task-graphs associated to the executor.
      Specified by:
      getCompileTime in interface ProfilerInterface
      Returns:
      long
    • getTornadoCompilerTime

      public long getTornadoCompilerTime()
      Returns Tornado JIT Compilation time, in ns, (from Java bc to final step in Graal LIR) for all immutable task-graphs associated to the executor.
      Specified by:
      getTornadoCompilerTime in interface ProfilerInterface
      Returns:
      long
    • getDriverInstallTime

      public long getDriverInstallTime()
      Returns the compilation time (in ns)that took the device driver (e.g., OpenCL driver) to create the device binary (e.g., from OpenCL C to binary, or from SPIR-V to binary).
      Specified by:
      getDriverInstallTime in interface ProfilerInterface
      Returns:
      long
    • getDataTransfersTime

      public long getDataTransfersTime()
      Returns the total data transfer time (in ns) for all immutable task-graphs to perform copies from host to device and device to host.
      Specified by:
      getDataTransfersTime in interface ProfilerInterface
      Returns:
      long
    • getDeviceWriteTime

      public long getDeviceWriteTime()
      Return the total time for all immutable task-graphs that took to send data to the device (host -> device).
      Specified by:
      getDeviceWriteTime in interface ProfilerInterface
      Returns:
      long
    • getDeviceReadTime

      public long getDeviceReadTime()
      Return the total time (in ns) for all immutable task-graphs that took to receive data to the host (device -> host).
      Specified by:
      getDeviceReadTime in interface ProfilerInterface
      Returns:
      long
    • getDataTransferDispatchTime

      public long getDataTransferDispatchTime()
      Returns the total time (in ns) that took for all immutable task-graphs to dispatch the command to send and receive data. This depends on the driver implementation.
      Specified by:
      getDataTransferDispatchTime in interface ProfilerInterface
      Returns:
      long
    • getKernelDispatchTime

      public long getKernelDispatchTime()
      Returns the total time (in ns) that took all kernels to be dispatched by the driver. This is mainly used for debugging purposes.
      Specified by:
      getKernelDispatchTime in interface ProfilerInterface
      Returns:
      long
    • getDeviceKernelTime

      public long getDeviceKernelTime()
      Returns the total time (in ns) for all immutable task-graphs to run the kernel. This metric is from the driver.
      Specified by:
      getDeviceKernelTime in interface ProfilerInterface
      Returns:
      long
    • getProfileLog

      public String getProfileLog()
      Returns the profiler log in a JSON format for all the tasks within the executor.
      Specified by:
      getProfileLog in interface ProfilerInterface
      Returns:
      String
    • getTotalBytesCopyIn

      public long getTotalBytesCopyIn()
      Returns the total number of bytes that were transferred to the hardware accelerator (host to device) for the current execution of the execution plan.
      Specified by:
      getTotalBytesCopyIn in interface ProfilerInterface
      Returns:
      long Number of bytes
    • getTotalBytesCopyOut

      public long getTotalBytesCopyOut()
      Returns the total number of bytes that were transferred to the host (device to host) for the current execution of the execution plan.
      Specified by:
      getTotalBytesCopyOut in interface ProfilerInterface
      Returns:
      long Number of bytes
    • dumpProfiles

      public void dumpProfiles()
      Dump in STDOUT all metrics associated to an execution. This is for debugging purposes.
    • getTotalBytesTransferred

      public long getTotalBytesTransferred()
      Return the total number of bytes transferred to/from the target accelerators.
      Specified by:
      getTotalBytesTransferred in interface ProfilerInterface
      Returns:
      long Number of bytes
    • getTotalDeviceMemoryUsage

      public long getTotalDeviceMemoryUsage()
      Return the total number of bytes allocated on the target device.
      Specified by:
      getTotalDeviceMemoryUsage in interface ProfilerInterface
      Returns:
      long Number of bytes.
    • getTraceExecutionPlan

      public String getTraceExecutionPlan()