IndexReduce along dim CUDA fix

Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2019-08-27 11:31:59 +03:00
parent df84bc7255
commit 05d45ec050
1 changed files with 2 additions and 2 deletions

View File

@ -894,13 +894,13 @@ public class CudaExecutioner extends DefaultOpExecutioner {
//long dimensionPointer = AtomicAllocator.getInstance().getPointer(Nd4j.createBuffer(dimension), context); //long dimensionPointer = AtomicAllocator.getInstance().getPointer(Nd4j.createBuffer(dimension), context);
Pointer dimensionPointer = AtomicAllocator.getInstance() Pointer dimensionPointer = AtomicAllocator.getInstance()
.getPointer(AtomicAllocator.getInstance().getConstantBuffer(dimension), context); .getHostPointer(AtomicAllocator.getInstance().getConstantBuffer(dimension));
nativeOps.execIndexReduce(xShapeInfoHostPointer, op.opNum(), nativeOps.execIndexReduce(xShapeInfoHostPointer, op.opNum(),
null, (LongPointer) hostXShapeInfo, x, (LongPointer) xShapeInfo, null, (LongPointer) hostXShapeInfo, x, (LongPointer) xShapeInfo,
extraArgs, extraArgs,
null, (LongPointer) hostZShapeInfo, z, (LongPointer) zShapeInfo, null, (LongPointer) hostZShapeInfo, z, (LongPointer) zShapeInfo,
null, dimensionPointer,
(LongPointer) op.dimensions().shapeInfoDataBuffer().addressPointer(), (LongPointer) op.dimensions().shapeInfoDataBuffer().addressPointer(),
AtomicAllocator.getInstance().getPointer(op.dimensions(), context), AtomicAllocator.getInstance().getPointer(op.dimensions(), context),
null); null);