Search in sources :

Example 1 with CudnnHandle

use of com.simiacryptus.mindseye.lang.cudnn.CudnnHandle in project MindsEye by SimiaCryptus.

the class ImgTileAssemblyLayer method copy.

/**
 * Copy.
 *
 * @param copyParams the copy params
 */
public void copy(final CopyParams copyParams) {
    CudnnHandle gpu = copyParams.gpu;
    gpu.initThread();
    assert CudaDevice.isThreadDeviceId(gpu.getDeviceId());
    @Nullable final CudaTensor inputBuffer = gpu.getTensor(copyParams.inObj[copyParams.inputIndex].getData(), precision, MemoryType.Device, false);
    copy(gpu, copyParams.length, copyParams.tileDimensions, inputBuffer, copyParams.outputDims, copyParams.outputBuffer, copyParams.positionX, copyParams.totalHeight);
    inputBuffer.freeRef();
}
Also used : CudaTensor(com.simiacryptus.mindseye.lang.cudnn.CudaTensor) CudnnHandle(com.simiacryptus.mindseye.lang.cudnn.CudnnHandle) Nullable(javax.annotation.Nullable)

Aggregations

CudaTensor (com.simiacryptus.mindseye.lang.cudnn.CudaTensor)1 CudnnHandle (com.simiacryptus.mindseye.lang.cudnn.CudnnHandle)1 Nullable (javax.annotation.Nullable)1