Repository: systemml Updated Branches: refs/heads/master 345682404 -> 57e11e99c
[SYSTEMML-703] Prepare for GPU on Jenkins, disable expensive NN tests Closes #550 Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/57e11e99 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/57e11e99 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/57e11e99 Branch: refs/heads/master Commit: 57e11e99c3f110b68ad5e3397f10b30533ab9b79 Parents: 3456824 Author: Nakul Jindal <naku...@gmail.com> Authored: Thu Jun 22 17:04:49 2017 -0700 Committer: Nakul Jindal <naku...@gmail.com> Committed: Thu Jun 22 17:04:49 2017 -0700 ---------------------------------------------------------------------- docs/release-process.md | 12 +++++++++ .../sysml/test/gpu/NeuralNetworkOpTests.java | 28 +++++++++++++++----- 2 files changed, 33 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/57e11e99/docs/release-process.md ---------------------------------------------------------------------- diff --git a/docs/release-process.md b/docs/release-process.md index f41c7c8..36528bd 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -259,6 +259,18 @@ For examples, see the [Spark MLContext Programming Guide](http://apache.github.i Verify that the performance suite located at scripts/perftest/ executes on Spark and Hadoop. Testing should include 80MB, 800MB, 8GB, and 80GB data sizes. +# Run NN Unit Tests for GPU + +<a href="#release-candidate-checklist">Up to Checklist</a> + +The unit tests for NN operators for GPU take a long time to run and are therefor not run as part of the Jenkins build. +They must be run before a release. To run them, edit the +[NeuralNetworkOpTests.java|https://github.com/apache/systemml/blob/master/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java] +file and remove all the `@Ignore` annotations from all the tests. Then run the NN unit tests using mvn verify: +``` +mvn -Dit.test=org.apache.sysml.test.gpu.NeuralNetworkOpTests verify -PgpuTests +``` + # Voting http://git-wip-us.apache.org/repos/asf/systemml/blob/57e11e99/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java b/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java index f4e931b..c53e803 100644 --- a/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java +++ b/src/test/java/org/apache/sysml/test/gpu/NeuralNetworkOpTests.java @@ -35,6 +35,15 @@ import org.junit.Test; /** * Test neural network operations on the GPU + * Because of the large number of cases that each test deals with, this class takes + * very long to run. (It took about 9 hours to run the testMaxPoolBackward() to completion. + * The recommended course of action before a release is + * 1. Remove the @Ignore annotations + * 2. Run just these test on a machine with CUDA 8 installed. + * Only this class can be run like so: + * <code> + * mvn -Dit.test=org.apache.sysml.test.gpu.NeuralNetworkOpTests verify -PgpuTests + * </code> */ public class NeuralNetworkOpTests extends GPUTests { @@ -100,6 +109,7 @@ public class NeuralNetworkOpTests extends GPUTests { return 1e-5; } + @Ignore @Test public void testConv2d() { String scriptStr = "O = conv2d(image, filter, padding=[padH, padW], stride=[strideH, strideW], input_shape=[N,C,H,W], filter_shape=[K,C,R,S])"; @@ -253,6 +263,7 @@ public class NeuralNetworkOpTests extends GPUTests { clearGPUMemory(); } + @Ignore @Test public void testConv2dBackwardFilter() { String scriptStr = "O = conv2d_backward_filter(image, dout, padding=[padH, padW], stride=[strideH, strideW], input_shape=[N,C,H,W], filter_shape=[K,C,R,S])"; @@ -298,9 +309,9 @@ public class NeuralNetworkOpTests extends GPUTests { filterSizeInMB, N, K, P, Q, doutSizeInMB, strideH, strideW, padH, padW); Matrix image = generateInputMatrix(spark, (int) N, - (int) (C * H * W), 0.-127.0, 127, sparsity, seed); + (int) (C * H * W), -127.0, 127, sparsity, seed); Matrix dout = generateInputMatrix(spark, (int) N, - (int) (K * P * Q), 0.-127.0, 127, sparsity, seed); + (int) (K * P * Q), -127.0, 127, sparsity, seed); HashMap<String, Object> inputs = new HashMap<>(); inputs.put("N", N); inputs.put("C", C); @@ -336,6 +347,7 @@ public class NeuralNetworkOpTests extends GPUTests { } } + @Ignore @Test public void testConv2dBackwardData() { String scriptStr = "O = conv2d_backward_data(filter, dout, padding=[padH, padW], stride=[strideH, strideW], input_shape=[N,C,H,W], filter_shape=[K,C,R,S])"; @@ -382,9 +394,9 @@ public class NeuralNetworkOpTests extends GPUTests { strideH, strideW, padH, padW); Matrix filter = generateInputMatrix(spark, (int) K, - (int) (C * R * S), 0.-127.0, 127, sparsity, seed); + (int) (C * R * S), -127.0, 127, sparsity, seed); Matrix dout = generateInputMatrix(spark, (int) N, - (int) (K * P * Q), 0.-127.0, 127, sparsity, seed); + (int) (K * P * Q), -127.0, 127, sparsity, seed); HashMap<String, Object> inputs = new HashMap<>(); inputs.put("N", N); inputs.put("C", C); @@ -420,6 +432,7 @@ public class NeuralNetworkOpTests extends GPUTests { } } + @Ignore @Test public void testMaxPool() { String scriptStr = "O = max_pool(image, padding=[padH, padW], stride=[strideH, strideW], input_shape=[N,C,H,W], pool_size=[R,S])"; @@ -464,7 +477,7 @@ public class NeuralNetworkOpTests extends GPUTests { P, Q, doutSizeInMB, strideH, strideW, padH, padW); Matrix image = generateInputMatrix(spark, (int) N, - (int) (C * H * W), 0.-127.0, 127, sparsity, seed); + (int) (C * H * W), -127.0, 127, sparsity, seed); HashMap<String, Object> inputs = new HashMap<>(); inputs.put("N", N); inputs.put("C", C); @@ -497,6 +510,7 @@ public class NeuralNetworkOpTests extends GPUTests { } } + @Ignore @Test public void testMaxPoolBackward() { String scriptStr = "O = max_pool_backward(image, dout, padding=[padH, padW], stride=[strideH, strideW], input_shape=[N,C,H,W], pool_size=[R,S])"; @@ -541,9 +555,9 @@ public class NeuralNetworkOpTests extends GPUTests { P, Q, doutSizeInMB, strideH, strideW, padH, padW); Matrix image = generateInputMatrix(spark, (int) N, - (int) (C * H * W), 0.-127.0, 127, sparsity, seed); + (int) (C * H * W), -127.0, 127, sparsity, seed); Matrix dout = generateInputMatrix(spark, (int) N, (int) (C * P * Q), - 0.-127.0, 127, sparsity, seed); + -127.0, 127, sparsity, seed); HashMap<String, Object> inputs = new HashMap<>(); inputs.put("N", N); inputs.put("C", C);