org.apache.sysml.runtime.instructions.gpu.context

Class JCudaContext

    • Field Detail

      • syncObj

        public static final Object syncObj
        Synchronization object to make sure no allocations happen when something is being evicted from memory
      • allocatedPointers

        public static ArrayList<GPUObject> allocatedPointers
        Global list of allocated GPUObject instances. This list must be accessed in a synchronized way
      • deviceCount

        public static int deviceCount
        The total number of cuda devices on this machine
      • DEBUG

        public static boolean DEBUG
        enable this to print debug information before code pertaining to the GPU is executed
      • GPU_MEMORY_UTILIZATION_FACTOR

        public double GPU_MEMORY_UTILIZATION_FACTOR
      • REFRESH_AVAILABLE_MEMORY_EVERY_TIME

        public boolean REFRESH_AVAILABLE_MEMORY_EVERY_TIME
    • Method Detail

      • getAvailableMemory

        public long getAvailableMemory()
        Description copied from class: GPUContext
        Gets device memory available for SystemML operations
        Specified by:
        getAvailableMemory in class GPUContext
        Returns:
        available memory
      • getGPUProperties

        public static jcuda.runtime.cudaDeviceProp getGPUProperties()
        Gets the device properties for the active GPU (set with cudaSetDevice())
        Returns:
        the device properties
      • getGPUProperties

        public static jcuda.runtime.cudaDeviceProp getGPUProperties(int device)
        Gets the device properties
        Parameters:
        device - the device number (on a machine with more than 1 GPU)
        Returns:
        the device properties
      • getMaxThreadsPerBlock

        public static int getMaxThreadsPerBlock()
        Gets the maximum number of threads per block for "active" GPU
        Returns:
        the maximum number of threads per block
      • getMaxBlocks

        public static int getMaxBlocks()
        Gets the maximum number of blocks supported by the active cuda device
        Returns:
        the maximum number of blocks supported
      • getMaxSharedMemory

        public static long getMaxSharedMemory()
        Gets the shared memory per block supported by the active cuda device
        Returns:
        the shared memory per block
      • getWarpSize

        public static int getWarpSize()
        Gets the warp size supported by the active cuda device
        Returns:
        the warp size
      • getAndAddAvailableMemory

        public long getAndAddAvailableMemory(long v)
        Gets the available memory and then adds value to it
        Parameters:
        v - the value to add
        Returns:
        the current available memory before adding value to it

Copyright © 2017 The Apache Software Foundation. All rights reserved.