Interface Environment


  • public interface Environment
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void allowHelpers​(boolean reallyAllow)
      Set whether helpers (cuDNN, DNNL/MKLDNN etc) are allowed
      int blasMajorVersion()
      BLAS major version number (if applicable)
      int blasMinorVersion()
      BLAS minor version number (if applicable)
      int blasPatchVersion()
      BLAS patch version number (if applicable)
      int elementwiseThreshold()
      Returns the elementwise threshold for ops
      long getDeviceCouner​(int deviceId)
      This method returns current allocated amount for a specific device.
      long getDeviceLimit​(int deviceId)
      This method returns current device limit
      long getGroupLimit​(int group)
      This method returns current group limit
      boolean helpersAllowed()
      Returns true if helpers (cuDNN, DNNL/MKLDNN etc) are allowed
      boolean isCPU()
      Return true if the backend is a CPU backend, or false otherwise
      boolean isDebug()
      Returns true if ND4J is set to debug mode
      boolean isDebugAndVerbose()
      Returns true if ND4J is set to debug and verbose mode
      boolean isDetectingLeaks()
      Returns true if ND4J is set to detecting leaks mode
      boolean isProfiling()
      Returns true if ND4J is set to profiling mode
      boolean isVerbose()
      Returns true if ND4J is set to verbose mode
      int maxMasterThreads()
      Returns the maximum number of master threads for C++ op execution (if applicable)
      int maxThreads()
      Returns the maximum number of threads for C++ op execution (if applicable)
      void setDebug​(boolean reallyDebug)
      Set debug mode
      void setDeviceLimit​(int deviceId, long numBytes)
      This method allows to set memory limit for a specific device.
      void setElementwiseThreshold​(int threshold)
      Set the elementwise threshold for ops
      void setGroupLimit​(int group, long numBytes)
      This method allows to set memory limit for a specific group of devices.
      void setLeaksDetector​(boolean reallyDetect)
      Set leaks detection mode
      void setMaxDeviceMemory​(long maxBytes)
      Set the maximum device memory
      void setMaxMasterThreads​(int max)
      Set the maximum number of master threads for C++ op execution (if applicable)
      void setMaxPrimaryMemory​(long maxBytes)
      Set the maximum primary memory
      void setMaxSpecialMemory​(long maxBytes)
      Set the maximum special memory
      void setMaxThreads​(int max)
      Set the maximum number of threads for C++ op execution (if applicable)
      void setProfiling​(boolean reallyProfile)
      Set profiling mode
      void setTadThreshold​(int threshold)
      Set the TAD (tensor along dimension) threshold for ops
      void setVerbose​(boolean reallyVerbose)
      Set verbose mode
      int tadThreshold()
      Returns the TAD (tensor along dimension) threshold for ops
    • Method Detail

      • blasMajorVersion

        int blasMajorVersion()
        BLAS major version number (if applicable)
      • blasMinorVersion

        int blasMinorVersion()
        BLAS minor version number (if applicable)
      • blasPatchVersion

        int blasPatchVersion()
        BLAS patch version number (if applicable)
      • isVerbose

        boolean isVerbose()
        Returns true if ND4J is set to verbose mode
      • setVerbose

        void setVerbose​(boolean reallyVerbose)
        Set verbose mode
      • isDebug

        boolean isDebug()
        Returns true if ND4J is set to debug mode
      • isProfiling

        boolean isProfiling()
        Returns true if ND4J is set to profiling mode
      • isDetectingLeaks

        boolean isDetectingLeaks()
        Returns true if ND4J is set to detecting leaks mode
      • isDebugAndVerbose

        boolean isDebugAndVerbose()
        Returns true if ND4J is set to debug and verbose mode
      • setDebug

        void setDebug​(boolean reallyDebug)
        Set debug mode
      • setProfiling

        void setProfiling​(boolean reallyProfile)
        Set profiling mode
      • setLeaksDetector

        void setLeaksDetector​(boolean reallyDetect)
        Set leaks detection mode
      • helpersAllowed

        boolean helpersAllowed()
        Returns true if helpers (cuDNN, DNNL/MKLDNN etc) are allowed
      • allowHelpers

        void allowHelpers​(boolean reallyAllow)
        Set whether helpers (cuDNN, DNNL/MKLDNN etc) are allowed
      • tadThreshold

        int tadThreshold()
        Returns the TAD (tensor along dimension) threshold for ops
      • setTadThreshold

        void setTadThreshold​(int threshold)
        Set the TAD (tensor along dimension) threshold for ops
      • elementwiseThreshold

        int elementwiseThreshold()
        Returns the elementwise threshold for ops
      • setElementwiseThreshold

        void setElementwiseThreshold​(int threshold)
        Set the elementwise threshold for ops
      • maxThreads

        int maxThreads()
        Returns the maximum number of threads for C++ op execution (if applicable)
      • setMaxThreads

        void setMaxThreads​(int max)
        Set the maximum number of threads for C++ op execution (if applicable)
      • maxMasterThreads

        int maxMasterThreads()
        Returns the maximum number of master threads for C++ op execution (if applicable)
      • setMaxMasterThreads

        void setMaxMasterThreads​(int max)
        Set the maximum number of master threads for C++ op execution (if applicable)
      • setMaxPrimaryMemory

        void setMaxPrimaryMemory​(long maxBytes)
        Set the maximum primary memory
      • setMaxSpecialMemory

        void setMaxSpecialMemory​(long maxBytes)
        Set the maximum special memory
      • setMaxDeviceMemory

        void setMaxDeviceMemory​(long maxBytes)
        Set the maximum device memory
      • isCPU

        boolean isCPU()
        Return true if the backend is a CPU backend, or false otherwise
      • setGroupLimit

        void setGroupLimit​(int group,
                           long numBytes)
        This method allows to set memory limit for a specific group of devices. I.e. CUDA or CPU
        Parameters:
        group -
        numBytes -
      • setDeviceLimit

        void setDeviceLimit​(int deviceId,
                            long numBytes)
        This method allows to set memory limit for a specific device. I.e. GPU_0
        Parameters:
        deviceId -
        numBytes -
      • getGroupLimit

        long getGroupLimit​(int group)
        This method returns current group limit
        Parameters:
        group -
        Returns:
      • getDeviceLimit

        long getDeviceLimit​(int deviceId)
        This method returns current device limit
        Parameters:
        deviceId -
        Returns:
      • getDeviceCouner

        long getDeviceCouner​(int deviceId)
        This method returns current allocated amount for a specific device. I.e. GPU_0
        Parameters:
        deviceId -
        Returns: