You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by na...@apache.org on 2017/05/02 00:55:21 UTC
incubator-systemml git commit: [HOTFIX] changes setGPU and
setForceGPU to do the right thing in mlctx
Repository: incubator-systemml
Updated Branches:
refs/heads/master 1cc219527 -> 7989ab4f3
[HOTFIX] changes setGPU and setForceGPU to do the right thing in mlctx
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/7989ab4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/7989ab4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/7989ab4f
Branch: refs/heads/master
Commit: 7989ab4f39802d0706618d495d06cb8126f98300
Parents: 1cc2195
Author: Nakul Jindal <na...@gmail.com>
Authored: Mon May 1 17:50:44 2017 -0700
Committer: Nakul Jindal <na...@gmail.com>
Committed: Mon May 1 17:50:44 2017 -0700
----------------------------------------------------------------------
.../sysml/api/mlcontext/ScriptExecutor.java | 24 ++++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/7989ab4f/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java b/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java
index 2044875..ee710b6 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java
@@ -248,12 +248,8 @@ public class ScriptExecutor {
if (symbolTable != null) {
executionContext.setVariables(symbolTable);
}
- oldGPU = DMLScript.USE_ACCELERATOR;
- oldStatistics = DMLScript.STATISTICS;
- oldForceGPU = DMLScript.FORCE_ACCELERATOR;
- DMLScript.USE_ACCELERATOR = gpu;
- DMLScript.FORCE_ACCELERATOR = forceGPU;
- DMLScript.STATISTICS = statistics;
+ oldStatistics = DMLScript.STATISTICS;
+ DMLScript.STATISTICS = statistics;
}
/**
@@ -654,17 +650,21 @@ public class ScriptExecutor {
* @param enabled
* true if enabled, false otherwise
*/
- public void setGPU(boolean enabled) {
- this.gpu = enabled;
- }
+ public void setGPU(boolean enabled) {
+ this.gpu = enabled;
+ oldGPU = DMLScript.USE_ACCELERATOR;
+ DMLScript.USE_ACCELERATOR = gpu;
+ }
/**
* Whether or not to force GPU usage
* @param enabled
* true if enabled, false otherwise
*/
- public void setForceGPU(boolean enabled) {
- this.forceGPU = enabled;
- }
+ public void setForceGPU(boolean enabled) {
+ this.forceGPU = enabled;
+ oldForceGPU = DMLScript.FORCE_ACCELERATOR;
+ DMLScript.FORCE_ACCELERATOR = forceGPU;
+ }
}