You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2017/04/22 23:15:41 UTC
incubator-systemml git commit: [MINOR] Fix gpu backend compiler
warnings and javadoc issues
Repository: incubator-systemml
Updated Branches:
refs/heads/master dd373ee01 -> 56e6b6e94
[MINOR] Fix gpu backend compiler warnings and javadoc issues
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/56e6b6e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/56e6b6e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/56e6b6e9
Branch: refs/heads/master
Commit: 56e6b6e94f6f98ab5152b2eb633f7d93a6cab1e6
Parents: dd373ee
Author: Matthias Boehm <mb...@gmail.com>
Authored: Sat Apr 22 16:17:38 2017 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Sat Apr 22 16:17:38 2017 -0700
----------------------------------------------------------------------
.../java/org/apache/sysml/api/DMLScript.java | 4 +--
.../gpu/AggregateUnaryGPUInstruction.java | 1 -
.../gpu/ConvolutionGPUInstruction.java | 1 -
.../instructions/gpu/MMTSJGPUInstruction.java | 1 -
.../gpu/MatrixBuiltinGPUInstruction.java | 1 -
.../MatrixMatrixArithmeticGPUInstruction.java | 1 -
.../gpu/MatrixMatrixAxpyGPUInstruction.java | 1 -
.../instructions/gpu/ReorgGPUInstruction.java | 1 -
.../instructions/gpu/context/CSRPointer.java | 23 ++++++++------
.../instructions/gpu/context/GPUContext.java | 8 +++--
.../gpu/context/GPUContextPool.java | 2 ++
.../instructions/gpu/context/GPUObject.java | 33 +++++++++++++-------
.../instructions/gpu/context/JCudaKernels.java | 4 +--
.../runtime/matrix/data/LibMatrixCUDA.java | 3 +-
.../runtime/matrix/data/LibMatrixReorg.java | 1 +
.../runtime/matrix/data/SparseBlockCSR.java | 2 +-
.../test/integration/AutomatedTestBase.java | 4 ---
17 files changed, 51 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/api/DMLScript.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/DMLScript.java b/src/main/java/org/apache/sysml/api/DMLScript.java
index febbf13..ab059a0 100644
--- a/src/main/java/org/apache/sysml/api/DMLScript.java
+++ b/src/main/java/org/apache/sysml/api/DMLScript.java
@@ -845,11 +845,11 @@ public class DMLScript
ec = ExecutionContextFactory.createContext(rtprog);
if (DMLScript.USE_ACCELERATOR && ec != null){
gCtx = GPUContextPool.getFromPool();
- gCtx.initializeThread();
- ec.setGPUContext(gCtx);
if (gCtx == null) {
throw new DMLRuntimeException("GPU : Could not create GPUContext, either no GPU or all GPUs currently in use");
}
+ gCtx.initializeThread();
+ ec.setGPUContext(gCtx);
}
rtprog.execute( ec );
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
index bfe30f9..8bdd397 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
@@ -27,7 +27,6 @@ import org.apache.sysml.runtime.functionobjects.ReduceCol;
import org.apache.sysml.runtime.functionobjects.ReduceRow;
import org.apache.sysml.runtime.instructions.InstructionUtils;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator;
import org.apache.sysml.runtime.matrix.operators.Operator;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
index e806f3b..497b182 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
@@ -26,7 +26,6 @@ import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.functionobjects.SwapIndex;
import org.apache.sysml.runtime.instructions.InstructionUtils;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.ReorgOperator;
import org.apache.sysml.runtime.util.ConvolutionUtils;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
index af97141..c147a6f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
@@ -32,7 +32,6 @@ import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.instructions.InstructionUtils;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.Operator;
import org.apache.sysml.utils.GPUStatistics;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
index 3fc8a98..ce25dec 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.Operator;
import org.apache.sysml.utils.GPUStatistics;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
index a1520a9..9573a1a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.BinaryOperator;
import org.apache.sysml.runtime.matrix.operators.Operator;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
index 28254c6..58905d6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
@@ -26,7 +26,6 @@ import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.instructions.InstructionUtils;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
import org.apache.sysml.runtime.instructions.cp.ScalarObject;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.Operator;
import org.apache.sysml.utils.GPUStatistics;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
index 424a2c5..53d56a3 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
@@ -25,7 +25,6 @@ import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.functionobjects.SwapIndex;
import org.apache.sysml.runtime.instructions.InstructionUtils;
import org.apache.sysml.runtime.instructions.cp.CPOperand;
-import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA;
import org.apache.sysml.runtime.matrix.operators.Operator;
import org.apache.sysml.runtime.matrix.operators.ReorgOperator;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
index c25bd22..ef549a1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
@@ -86,25 +86,25 @@ public class CSRPointer {
allocateMatDescrPointer();
}
- private Pointer allocate(String instName, long size) throws DMLRuntimeException {
- return getGPUContext().allocate(instName, size);
- }
+// private Pointer allocate(String instName, long size) throws DMLRuntimeException {
+// return getGPUContext().allocate(instName, size);
+// }
private Pointer allocate(long size) throws DMLRuntimeException {
return getGPUContext().allocate(size);
}
- private void cudaFreeHelper(Pointer toFree) throws DMLRuntimeException {
- getGPUContext().cudaFreeHelper(toFree);
- }
+// private void cudaFreeHelper(Pointer toFree) throws DMLRuntimeException {
+// getGPUContext().cudaFreeHelper(toFree);
+// }
private void cudaFreeHelper(Pointer toFree, boolean eager) throws DMLRuntimeException {
getGPUContext().cudaFreeHelper(toFree, eager);
}
- private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) throws DMLRuntimeException {
- getGPUContext().cudaFreeHelper(instName, toFree, eager);
- }
+// private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) throws DMLRuntimeException {
+// getGPUContext().cudaFreeHelper(instName, toFree, eager);
+// }
private static long getDoubleSizeOf(long numElems) {
return numElems * ((long)jcuda.Sizeof.DOUBLE);
@@ -235,6 +235,7 @@ public class CSRPointer {
* Estimates the number of non-zero elements from the result of a sparse matrix multiplication C = A * B
* and returns the {@link CSRPointer} to C with the appropriate GPU memory.
*
+ * @param gCtx ?
* @param handle a valid {@link cusparseHandle}
* @param A Sparse Matrix A on GPU
* @param transA 'T' if A is to be transposed, 'N' otherwise
@@ -298,6 +299,7 @@ public class CSRPointer {
/**
* Factory method to allocate an empty CSR Sparse matrix on the GPU
*
+ * @param gCtx ?
* @param nnz2 number of non-zeroes
* @param rows number of rows
* @return a {@link CSRPointer} instance that encapsulates the CSR matrix on GPU
@@ -449,6 +451,8 @@ public class CSRPointer {
/**
* Calls cudaFree lazily on the allocated {@link Pointer} instances
+ *
+ * @throws DMLRuntimeException ?
*/
public void deallocate() throws DMLRuntimeException {
deallocate(false);
@@ -458,6 +462,7 @@ public class CSRPointer {
* Calls cudaFree lazily or eagerly on the allocated {@link Pointer} instances
*
* @param eager whether to do eager or lazy cudaFrees
+ * @throws DMLRuntimeException ?
*/
public void deallocate(boolean eager) throws DMLRuntimeException {
if (nnz > 0) {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
index 708f291..d6f3a71 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
@@ -155,7 +155,6 @@ public class GPUContext {
cudaSetDevice(deviceNum);
}
- @SuppressWarnings("unused")
public static int cudaGetDevice() {
int[] device = new int[1];
JCuda.cudaGetDevice(device);
@@ -492,6 +491,7 @@ public class GPUContext {
* Gets the device properties for the active GPU (set with cudaSetDevice())
*
* @return the device properties
+ * @throws DMLRuntimeException ?
*/
public cudaDeviceProp getGPUProperties() throws DMLRuntimeException {
return GPUContextPool.getGPUProperties(deviceNum);
@@ -501,6 +501,7 @@ public class GPUContext {
* Gets the maximum number of threads per block for "active" GPU
*
* @return the maximum number of threads per block
+ * @throws DMLRuntimeException ?
*/
public int getMaxThreadsPerBlock() throws DMLRuntimeException {
cudaDeviceProp deviceProps = getGPUProperties();
@@ -511,6 +512,7 @@ public class GPUContext {
* Gets the maximum number of blocks supported by the active cuda device
*
* @return the maximum number of blocks supported
+ * @throws DMLRuntimeException ?
*/
public int getMaxBlocks() throws DMLRuntimeException {
cudaDeviceProp deviceProp = getGPUProperties();
@@ -521,6 +523,7 @@ public class GPUContext {
* Gets the shared memory per block supported by the active cuda device
*
* @return the shared memory per block
+ * @throws DMLRuntimeException ?
*/
public long getMaxSharedMemory() throws DMLRuntimeException {
cudaDeviceProp deviceProp = getGPUProperties();
@@ -531,6 +534,7 @@ public class GPUContext {
* Gets the warp size supported by the active cuda device
*
* @return the warp size
+ * @throws DMLRuntimeException ?
*/
public int getWarpSize() throws DMLRuntimeException {
cudaDeviceProp deviceProp = getGPUProperties();
@@ -574,7 +578,7 @@ public class GPUContext {
/**
* Clears all memory used by this {@link GPUContext}
* Be careful to ensure that no memory is currently being used before invoking this
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException ?
*/
public void clearMemory() throws DMLRuntimeException {
while (allocatedGPUObjects.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
index 6452651..1d0b5c8 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
@@ -61,6 +61,7 @@ public class GPUContextPool {
* Also sets behaviour for J{Cuda, Cudnn, Cublas, Cusparse} in case of error
* Initializes the CUDA driver
* All these need be done once, and not per GPU
+ * @throws DMLRuntimeException ?
*/
public synchronized static void initializeGPU() throws DMLRuntimeException {
GPUContext.LOG.info("Initializing CUDA");
@@ -109,6 +110,7 @@ public class GPUContextPool {
/**
* Gets an initialized GPUContext from a pool of GPUContexts, each linked to a GPU
* @return null if not more GPUContexts in pool, a valid GPUContext otherwise
+ * @throws DMLRuntimeException ?
*/
public static synchronized GPUContext getFromPool() throws DMLRuntimeException {
if (!initialized) initializeGPU();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
index 3a1fafa..dd5ba41 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
@@ -96,9 +96,9 @@ public class GPUObject {
/** Enclosing {@link MatrixObject} instance */
protected MatrixObject mat = null;
- private Pointer allocate(String instName, long size) throws DMLRuntimeException {
- return getGPUContext().allocate(instName, size);
- }
+// private Pointer allocate(String instName, long size) throws DMLRuntimeException {
+// return getGPUContext().allocate(instName, size);
+// }
private Pointer allocate(long size) throws DMLRuntimeException {
return getGPUContext().allocate(size);
@@ -108,9 +108,9 @@ public class GPUObject {
getGPUContext().cudaFreeHelper(toFree);
}
- private void cudaFreeHelper(Pointer toFree, boolean eager) throws DMLRuntimeException {
- getGPUContext().cudaFreeHelper(toFree, eager);
- }
+// private void cudaFreeHelper(Pointer toFree, boolean eager) throws DMLRuntimeException {
+// getGPUContext().cudaFreeHelper(toFree, eager);
+// }
private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) throws DMLRuntimeException {
getGPUContext().cudaFreeHelper(instName, toFree, eager);
@@ -200,7 +200,6 @@ public class GPUObject {
* @return the debug string
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
- @SuppressWarnings("unused")
public static String debugString(Pointer A, long rows, long cols) throws DMLRuntimeException {
StringBuffer sb = new StringBuffer();
int len = toIntExact(rows * cols);
@@ -230,6 +229,8 @@ public class GPUObject {
* Make sure to call {@link #addReadLock()} after this to set appropriate state, if you are not sure what you are doing.
* Needed for operations like {@link JCusparse#cusparseDcsrgemm(cusparseHandle, int, int, int, int, int, cusparseMatDescr, int, Pointer, Pointer, Pointer, cusparseMatDescr, int, Pointer, Pointer, Pointer, cusparseMatDescr, Pointer, Pointer, Pointer)}
* @param sparseMatrixPtr CSR (compressed sparse row) pointer
+ *
+ * @throws DMLRuntimeException ?
*/
public void setSparseMatrixCudaPointer(CSRPointer sparseMatrixPtr) throws DMLRuntimeException {
this.jcudaSparseMatrixPtr = sparseMatrixPtr;
@@ -245,6 +246,7 @@ public class GPUObject {
* Make sure to call {@link #addReadLock()} after this to set appropriate state, if you are not sure what you are doing.
*
* @param densePtr dense pointer
+ * @throws DMLRuntimeException ?
*/
public void setDenseMatrixCudaPointer(Pointer densePtr) throws DMLRuntimeException{
this.jcudaDenseMatrixPtr = densePtr;
@@ -543,7 +545,7 @@ public class GPUObject {
/**
* if the data is allocated on the GPU and is dirty, it is copied back to the host memory
* @return true if a copy to host happened, false otherwise
- * @throws CacheException
+ * @throws CacheException ?
*/
public boolean acquireHostRead() throws CacheException {
boolean copied = false;
@@ -825,17 +827,26 @@ public class GPUObject {
}
- /** Pointer to dense matrix */
+ /**
+ * Pointer to dense matrix
+ * @return ?
+ */
public Pointer getJcudaDenseMatrixPtr() {
return jcudaDenseMatrixPtr;
}
- /** Pointer to sparse matrix */
+ /**
+ * Pointer to sparse matrix
+ * @return ?
+ */
public CSRPointer getJcudaSparseMatrixPtr() {
return jcudaSparseMatrixPtr;
}
- /** Whether this block is dirty on the GPU */
+ /**
+ * Whether this block is dirty on the GPU
+ * @return ?
+ */
public boolean isDirty() {
return dirty;
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
index b4cb87d..ac11df9 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
@@ -48,7 +48,7 @@ public class JCudaKernels {
private final static String ptxFileName = "/kernels/SystemML.ptx";
private HashMap<String, CUfunction> kernels = new HashMap<String, CUfunction>();
private CUmodule module;
- private final int deviceNum;
+// private final int deviceNum;
/**
* Loads the kernels in the file ptxFileName. Though cubin files are also supported, we will stick with
@@ -57,7 +57,7 @@ public class JCudaKernels {
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
JCudaKernels(int deviceNum) throws DMLRuntimeException {
- this.deviceNum = deviceNum;
+// this.deviceNum = deviceNum;
module = new CUmodule();
// Load the kernels specified in the ptxFileName file
checkResult(cuModuleLoadDataEx(module, initKernels(ptxFileName), 0, new int[0], Pointer.to(new int[0])));
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
index 3c32137..9ddd87a 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
@@ -56,7 +56,6 @@ import static jcuda.jcusparse.JCusparse.cusparseDcsrgemm;
import static jcuda.jcusparse.JCusparse.cusparseDcsrmv;
import static jcuda.jcusparse.cusparseOperation.CUSPARSE_OPERATION_NON_TRANSPOSE;
import static jcuda.jcusparse.cusparseOperation.CUSPARSE_OPERATION_TRANSPOSE;
-import static jcuda.runtime.JCuda.cudaDeviceSynchronize;
import static jcuda.runtime.JCuda.cudaMemcpy;
import static jcuda.runtime.cudaMemcpyKind.cudaMemcpyDeviceToDevice;
import static jcuda.runtime.cudaMemcpyKind.cudaMemcpyDeviceToHost;
@@ -2810,7 +2809,7 @@ public class LibMatrixCUDA {
if (GPUStatistics.DISPLAY_STATISTICS) GPUStatistics.maintainCPMiscTimes(instName, GPUInstruction.MISC_TIMER_SPARSE_ALLOCATE_LIB, System.nanoTime() - t1);
out.getGPUObject(gCtx).setSparseMatrixCudaPointer(C);
- long sizeOfC = CSRPointer.estimateSize(C.nnz, out.getNumRows());
+ //long sizeOfC = CSRPointer.estimateSize(C.nnz, out.getNumRows());
out.getGPUObject(gCtx).addReadLock();
if (GPUStatistics.DISPLAY_STATISTICS) t0 = System.nanoTime();
JCusparse.cusparseDcsrgeam(getCusparseHandle(gCtx), m, n, alphaPtr, A.descr, (int)A.nnz, A.val, A.rowPtr, A.colInd, betaPtr,
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
index edf69c1..bfaf4c8 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
@@ -642,6 +642,7 @@ public class LibMatrixReorg
* @param rows ?
* @param cast ?
* @param ignore ?
+ * @param k degree of parallelism
* @return output matrix
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/main/java/org/apache/sysml/runtime/matrix/data/SparseBlockCSR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/SparseBlockCSR.java b/src/main/java/org/apache/sysml/runtime/matrix/data/SparseBlockCSR.java
index 9ddff9e..a4e680d 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/SparseBlockCSR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/SparseBlockCSR.java
@@ -171,7 +171,7 @@ public class SparseBlockCSR extends SparseBlock
*
* @param nnz number of non-zeros to read
* @param in data input stream of ijv triples, ordered by ij
- * @throws IOException
+ * @throws IOException if deserialization error occurs
*/
public void initUltraSparse(int nnz, DataInput in)
throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e6b6e9/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
index b20f66a..d1cba1d 100644
--- a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
+++ b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
@@ -65,10 +65,6 @@ import org.apache.sysml.runtime.util.MapReduceTool;
import org.apache.sysml.test.utils.TestUtils;
import org.apache.sysml.utils.ParameterBuilder;
import org.apache.sysml.utils.Statistics;
-import org.apache.wink.json4j.JSONObject;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
/**