public class CpuEnvironment extends Object implements Environment
Environment
Modifier | Constructor and Description |
---|---|
protected |
CpuEnvironment(Nd4jCpu.Environment environment) |
Modifier and Type | Method and 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
|
static CpuEnvironment |
getInstance() |
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
|
protected CpuEnvironment(Nd4jCpu.Environment environment)
public static CpuEnvironment getInstance()
public int blasMajorVersion()
Environment
blasMajorVersion
in interface Environment
public int blasMinorVersion()
Environment
blasMinorVersion
in interface Environment
public int blasPatchVersion()
Environment
blasPatchVersion
in interface Environment
public boolean isVerbose()
Environment
isVerbose
in interface Environment
public void setVerbose(boolean reallyVerbose)
Environment
setVerbose
in interface Environment
public boolean isDebug()
Environment
isDebug
in interface Environment
public boolean isProfiling()
Environment
isProfiling
in interface Environment
public boolean isDetectingLeaks()
Environment
isDetectingLeaks
in interface Environment
public boolean isDebugAndVerbose()
Environment
isDebugAndVerbose
in interface Environment
public void setDebug(boolean reallyDebug)
Environment
setDebug
in interface Environment
public void setProfiling(boolean reallyProfile)
Environment
setProfiling
in interface Environment
public void setLeaksDetector(boolean reallyDetect)
Environment
setLeaksDetector
in interface Environment
public boolean helpersAllowed()
Environment
helpersAllowed
in interface Environment
public void allowHelpers(boolean reallyAllow)
Environment
allowHelpers
in interface Environment
public int tadThreshold()
Environment
tadThreshold
in interface Environment
public void setTadThreshold(int threshold)
Environment
setTadThreshold
in interface Environment
public int elementwiseThreshold()
Environment
elementwiseThreshold
in interface Environment
public void setElementwiseThreshold(int threshold)
Environment
setElementwiseThreshold
in interface Environment
public int maxThreads()
Environment
maxThreads
in interface Environment
public void setMaxThreads(int max)
Environment
setMaxThreads
in interface Environment
public int maxMasterThreads()
Environment
maxMasterThreads
in interface Environment
public void setMaxMasterThreads(int max)
Environment
setMaxMasterThreads
in interface Environment
public void setMaxPrimaryMemory(long maxBytes)
Environment
setMaxPrimaryMemory
in interface Environment
public void setMaxSpecialMemory(long maxBytes)
Environment
setMaxSpecialMemory
in interface Environment
public void setMaxDeviceMemory(long maxBytes)
Environment
setMaxDeviceMemory
in interface Environment
public boolean isCPU()
Environment
isCPU
in interface Environment
public void setGroupLimit(int group, long numBytes)
Environment
setGroupLimit
in interface Environment
public void setDeviceLimit(int deviceId, long numBytes)
Environment
setDeviceLimit
in interface Environment
public long getGroupLimit(int group)
Environment
getGroupLimit
in interface Environment
public long getDeviceLimit(int deviceId)
Environment
getDeviceLimit
in interface Environment
public long getDeviceCouner(int deviceId)
Environment
getDeviceCouner
in interface Environment
Copyright © 2020. All rights reserved.