Repository: systemml
Updated Branches:
  refs/heads/master 3bad7e7a3 -> eb179b151


[MINOR] Fix warnings memory profiling (imports, raw types)

Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/eb179b15
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/eb179b15
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/eb179b15

Branch: refs/heads/master
Commit: eb179b151b3dadf818caf92aefdc48d92a4454ba
Parents: 3bad7e7
Author: Matthias Boehm <[email protected]>
Authored: Sat Jul 7 15:14:09 2018 -0700
Committer: Matthias Boehm <[email protected]>
Committed: Sat Jul 7 15:14:09 2018 -0700

----------------------------------------------------------------------
 src/main/java/org/apache/sysml/api/DMLScript.java         | 10 +++++-----
 .../java/org/apache/sysml/api/jmlc/PreparedScript.java    |  1 -
 .../sysml/runtime/controlprogram/LocalVariableMap.java    |  2 +-
 src/main/java/org/apache/sysml/utils/Statistics.java      |  2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/eb179b15/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 ee4be28..9ecd83b 100644
--- a/src/main/java/org/apache/sysml/api/DMLScript.java
+++ b/src/main/java/org/apache/sysml/api/DMLScript.java
@@ -166,16 +166,16 @@ public class DMLScript
 
        public static RUNTIME_PLATFORM  rtplatform          = 
DMLOptions.defaultOptions.execMode;    // the execution mode
        public static boolean           STATISTICS          = 
DMLOptions.defaultOptions.stats;       // whether to print statistics
-       public static boolean           FINEGRAINED_STATISTICS  = false;        
                                             // whether to print fine-grained 
statistics
-       public static boolean                   JMLC_MEMORY_STATISTICS = false; 
                                                         // whether to gather 
memory use stats in JMLC
+       public static boolean           FINEGRAINED_STATISTICS  = false;        
                     // whether to print fine-grained statistics
+       public static boolean           JMLC_MEMORY_STATISTICS = false;         
                     // whether to gather memory use stats in JMLC
        public static int               STATISTICS_COUNT    = 
DMLOptions.defaultOptions.statsCount;  // statistics maximum heavy hitter count
        public static int               STATISTICS_MAX_WRAP_LEN = 30;           
                     // statistics maximum wrap length
        public static boolean           ENABLE_DEBUG_MODE   = 
DMLOptions.defaultOptions.debug;       // debug mode
        public static ExplainType       EXPLAIN             = 
DMLOptions.defaultOptions.explainType; // explain type
        public static String            DML_FILE_PATH_ANTLR_PARSER = 
DMLOptions.defaultOptions.filePath; // filename of dml/pydml script
-       public static String            FLOATING_POINT_PRECISION = "double";    
                                                // data type to use internally
-       public static EvictionPolicy    GPU_EVICTION_POLICY = 
EvictionPolicy.ALIGN_MEMORY;                              // currently employed 
GPU eviction policy
-       public static boolean                   PRINT_GPU_MEMORY_INFO = false;  
                                                                // whether to 
print GPU memory-related information
+       public static String            FLOATING_POINT_PRECISION = "double";    
                     // data type to use internally
+       public static EvictionPolicy    GPU_EVICTION_POLICY = 
EvictionPolicy.ALIGN_MEMORY;           // currently employed GPU eviction policy
+       public static boolean           PRINT_GPU_MEMORY_INFO = false;          
                     // whether to print GPU memory-related information
 
        /**
         * Global variable indicating the script type (DML or PYDML). Can be 
used

http://git-wip-us.apache.org/repos/asf/systemml/blob/eb179b15/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java 
b/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
index dec7eb9..3fd3c67 100644
--- a/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
+++ b/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
@@ -30,7 +30,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.sysml.api.ConfigurableAPI;
 import org.apache.sysml.api.DMLException;
-import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.conf.CompilerConfig;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.conf.DMLConfig;

http://git-wip-us.apache.org/repos/asf/systemml/blob/eb179b15/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java 
b/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
index 6ab1efe..dd8d7d2 100644
--- 
a/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
+++ 
b/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
@@ -136,7 +136,7 @@ public class LocalVariableMap implements Cloneable
                        int hash = System.identityHashCode(e.getValue());
                        if( !dict.containsKey(hash) && e.getValue() instanceof 
CacheableData ) {
                                dict.put(hash, e.getValue());
-                               double size = ((CacheableData) 
e.getValue()).getDataSize();
+                               double size = ((CacheableData<?>) 
e.getValue()).getDataSize();
                                if ((DMLScript.JMLC_MEMORY_STATISTICS) && 
(DMLScript.FINEGRAINED_STATISTICS))
                                        
Statistics.maintainCPHeavyHittersMem(e.getKey(), size);
                                total += size;

http://git-wip-us.apache.org/repos/asf/systemml/blob/eb179b15/src/main/java/org/apache/sysml/utils/Statistics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/utils/Statistics.java 
b/src/main/java/org/apache/sysml/utils/Statistics.java
index 107afe0..7c16375 100644
--- a/src/main/java/org/apache/sysml/utils/Statistics.java
+++ b/src/main/java/org/apache/sysml/utils/Statistics.java
@@ -791,6 +791,7 @@ public class Statistics
                return sb.toString();
        }
 
+       @SuppressWarnings("unchecked")
        public static String getCPHeavyHittersMem(int num) {
                int n = _cpMemObjs.size();
                if ((n <= 0) || (num <= 0))
@@ -815,7 +816,6 @@ public class Statistics
                res.append(String.format("  %-" + numPadLen + "s" + "  %-" + 
maxNameLength + "s" + "  %s\n",
                                "#", "Object", "Memory"));
 
-               // lots of futzing around to format strings...
                for (int ix = 1; ix <= numHittersToDisplay; ix++) {
                        String objName = entries[ix-1].getKey();
                        String objSize = 
byteCountToDisplaySize(entries[ix-1].getValue());

Reply via email to