public class LayerWorkspaceMgr extends BaseWorkspaceMgr<ArrayType>
Modifier and Type | Class and Description |
---|---|
static class |
LayerWorkspaceMgr.Builder |
Modifier and Type | Field and Description |
---|---|
static String |
CUDNN_WORKSPACE_KEY |
protected Map<String,org.bytedeco.javacpp.Pointer> |
helperWorkspacePointers |
protected Set<String> |
noLeverageOverride |
configMap, scopeOutOfWs, workspaceNames
Constructor and Description |
---|
LayerWorkspaceMgr(Set<ArrayType> scopeOutOfWs,
Map<ArrayType,WorkspaceConfiguration> configMap,
Map<ArrayType,String> workspaceNames) |
Modifier and Type | Method and Description |
---|---|
static LayerWorkspaceMgr.Builder |
builder() |
<T extends org.bytedeco.javacpp.Pointer> |
getHelperWorkspace(String key)
Get the pointer to the helper memory.
|
INDArray |
leverageTo(ArrayType arrayType,
INDArray array) |
static LayerWorkspaceMgr |
noWorkspaces() |
static LayerWorkspaceMgr |
noWorkspaces(Map<String,org.bytedeco.javacpp.Pointer> helperWorkspacePointers) |
static LayerWorkspaceMgr |
noWorkspacesImmutable() |
void |
setHelperWorkspace(@NonNull String key,
org.bytedeco.javacpp.Pointer value)
Set the pointer to the helper memory.
|
void |
setNoLeverageOverride(String wsName) |
INDArray |
validateArrayLocation(@NonNull ArrayType arrayType,
@NonNull INDArray array,
boolean migrateIfInvalid,
boolean exceptionIfDetached) |
assertCurrentWorkspace, assertNotOpen, assertOpen, castTo, create, create, createUninitialized, createUninitialized, dup, dup, getConfiguration, getWorkspaceName, hasConfiguration, isScopedOut, isWorkspaceOpen, notifyScopeBorrowed, notifyScopeEntered, notifyScopeEntered, setConfiguration, setScopedOutFor, setWorkspace, setWorkspaceName
public static String CUDNN_WORKSPACE_KEY
public void setNoLeverageOverride(String wsName)
public INDArray leverageTo(ArrayType arrayType, INDArray array)
leverageTo
in interface WorkspaceMgr<ArrayType>
leverageTo
in class BaseWorkspaceMgr<ArrayType>
public INDArray validateArrayLocation(@NonNull @NonNull ArrayType arrayType, @NonNull @NonNull INDArray array, boolean migrateIfInvalid, boolean exceptionIfDetached)
validateArrayLocation
in interface WorkspaceMgr<ArrayType>
validateArrayLocation
in class BaseWorkspaceMgr<ArrayType>
public <T extends org.bytedeco.javacpp.Pointer> T getHelperWorkspace(String key)
T
- Pointer typekey
- Key for the helper workspace pointerpublic void setHelperWorkspace(@NonNull @NonNull String key, org.bytedeco.javacpp.Pointer value)
key
- Key for the helper workspace pointervalue
- Pointerpublic static LayerWorkspaceMgr.Builder builder()
public static LayerWorkspaceMgr noWorkspaces(Map<String,org.bytedeco.javacpp.Pointer> helperWorkspacePointers)
helperWorkspacePointers
- Helper pointers - see getHelperWorkspace(String)
for detailspublic static LayerWorkspaceMgr noWorkspaces()
public static LayerWorkspaceMgr noWorkspacesImmutable()
Copyright © 2021. All rights reserved.