Class ShadowBuffer
- java.lang.Object
-
- org.apache.sysds.runtime.instructions.gpu.context.ShadowBuffer
-
public class ShadowBuffer extends Object
-
-
Constructor Summary
Constructors Constructor Description ShadowBuffer(GPUObject gpuObj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearShadowPointer()
Removes the content from shadow bufferboolean
isBuffered()
Check if the gpu object is shadow bufferedboolean
isEligibleForBuffering(boolean isEviction, boolean eagerDelete)
Checks if the GPU object is eligible for shadow bufferingvoid
moveFromDevice(String instName)
Move the data from GPU to shadow buffervoid
moveToDevice()
Move the data from shadow buffer to GPUvoid
moveToHost()
Move the data from shadow buffer to Matrix object
-
-
-
Constructor Detail
-
ShadowBuffer
public ShadowBuffer(GPUObject gpuObj)
-
-
Method Detail
-
isBuffered
public boolean isBuffered()
Check if the gpu object is shadow buffered- Returns:
- true if the gpu object is shadow buffered
-
moveFromDevice
public void moveFromDevice(String instName)
Move the data from GPU to shadow buffer- Parameters:
instName
- name of the instruction
-
moveToHost
public void moveToHost()
Move the data from shadow buffer to Matrix object
-
moveToDevice
public void moveToDevice()
Move the data from shadow buffer to GPU
-
isEligibleForBuffering
public boolean isEligibleForBuffering(boolean isEviction, boolean eagerDelete)
Checks if the GPU object is eligible for shadow buffering- Parameters:
isEviction
- true if this method is called during evictioneagerDelete
- true if the data on device has to be eagerly deleted- Returns:
- true if the given GPU object is eligible to be shadow buffered
-
clearShadowPointer
public void clearShadowPointer()
Removes the content from shadow buffer
-
-