From 05d45ec0508def2034510b373a0f61d1abe8bf0e Mon Sep 17 00:00:00 2001 From: raver119 Date: Tue, 27 Aug 2019 11:31:59 +0300 Subject: [PATCH] IndexReduce along dim CUDA fix Signed-off-by: raver119 --- .../nd4j/linalg/jcublas/ops/executioner/CudaExecutioner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaExecutioner.java b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaExecutioner.java index 54649692c..afeff4d8b 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaExecutioner.java +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaExecutioner.java @@ -894,13 +894,13 @@ public class CudaExecutioner extends DefaultOpExecutioner { //long dimensionPointer = AtomicAllocator.getInstance().getPointer(Nd4j.createBuffer(dimension), context); Pointer dimensionPointer = AtomicAllocator.getInstance() - .getPointer(AtomicAllocator.getInstance().getConstantBuffer(dimension), context); + .getHostPointer(AtomicAllocator.getInstance().getConstantBuffer(dimension)); nativeOps.execIndexReduce(xShapeInfoHostPointer, op.opNum(), null, (LongPointer) hostXShapeInfo, x, (LongPointer) xShapeInfo, extraArgs, null, (LongPointer) hostZShapeInfo, z, (LongPointer) zShapeInfo, - null, + dimensionPointer, (LongPointer) op.dimensions().shapeInfoDataBuffer().addressPointer(), AtomicAllocator.getInstance().getPointer(op.dimensions(), context), null);