[SYSTEMML-2144] Disable codegen for config w/ forced gpu operations Until the codegen framework supports the generation of GPU operations, we globally disable code generation in case of forced GPU acceleration.
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/056e48d0 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/056e48d0 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/056e48d0 Branch: refs/heads/master Commit: 056e48d0cdd984c722797e71f2a4aec041c19690 Parents: 6e93295 Author: Matthias Boehm <[email protected]> Authored: Sat Feb 10 13:51:06 2018 -0800 Committer: Matthias Boehm <[email protected]> Committed: Sat Feb 10 13:51:06 2018 -0800 ---------------------------------------------------------------------- .../java/org/apache/sysml/conf/ConfigurationManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/056e48d0/src/main/java/org/apache/sysml/conf/ConfigurationManager.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/conf/ConfigurationManager.java b/src/main/java/org/apache/sysml/conf/ConfigurationManager.java index 0ddc78a..bbba53f 100644 --- a/src/main/java/org/apache/sysml/conf/ConfigurationManager.java +++ b/src/main/java/org/apache/sysml/conf/ConfigurationManager.java @@ -20,6 +20,7 @@ package org.apache.sysml.conf; import org.apache.hadoop.mapred.JobConf; +import org.apache.sysml.api.DMLScript; import org.apache.sysml.conf.CompilerConfig.ConfigType; import org.apache.sysml.runtime.matrix.mapred.MRConfigurationNames; import org.apache.sysml.runtime.matrix.mapred.MRJobConfiguration; @@ -190,11 +191,14 @@ public class ConfigurationManager } public static boolean isCodegenEnabled() { - return getDMLConfig().getBooleanValue(DMLConfig.CODEGEN) - || getCompilerConfigFlag(ConfigType.CODEGEN_ENABLED); + return (getDMLConfig().getBooleanValue(DMLConfig.CODEGEN) + || getCompilerConfigFlag(ConfigType.CODEGEN_ENABLED)) + && !DMLScript.USE_ACCELERATOR; + //note: until codegen is supported for the GPU backend, we globally + //disable codegen if operations are forced to the GPU to avoid + //a counter-productive impact on performance. } - /////////////////////////////////////// // Thread-local classes
