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 2015/12/03 18:37:00 UTC

[1/2] incubator-systemml git commit: Fix value type inference of relational matrix operations w/o ppred

Repository: incubator-systemml
Updated Branches:
  refs/heads/master 35154b1f9 -> a4264859d


Fix value type inference of relational matrix operations w/o ppred

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

Branch: refs/heads/master
Commit: 01c82f8b9b6e517effd63b6d04609facfb870c44
Parents: 35154b1
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Wed Dec 2 19:01:48 2015 -0800
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Wed Dec 2 19:01:48 2015 -0800

----------------------------------------------------------------------
 src/main/java/com/ibm/bi/dml/parser/Expression.java     | 12 ++++++------
 .../com/ibm/bi/dml/parser/RelationalExpression.java     |  5 ++++-
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/01c82f8b/src/main/java/com/ibm/bi/dml/parser/Expression.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/ibm/bi/dml/parser/Expression.java b/src/main/java/com/ibm/bi/dml/parser/Expression.java
index 59019ee..478b099 100644
--- a/src/main/java/com/ibm/bi/dml/parser/Expression.java
+++ b/src/main/java/com/ibm/bi/dml/parser/Expression.java
@@ -314,10 +314,10 @@ public abstract class Expression
 				return DataType.MATRIX;
 		}
 
-		LOG.error(id1.printErrorLocation() + "Invalid Datatypes for operation");
-		
-		throw new LanguageException(id1.printErrorLocation() + "Invalid Datatypes for operation",
+		//raise error with id1 location
+		id1.raiseValidateError("Invalid Datatypes for operation "+d1+" "+d2, false, 
 				LanguageException.LanguageErrorCodes.INVALID_PARAMETERS);
+		return null; //never reached because unconditional
 	}
 
 	public static ValueType computeValueType(Expression e1, Expression e2, boolean cast) throws LanguageException {
@@ -343,10 +343,10 @@ public abstract class Expression
 				return ValueType.STRING;
 		}
 
-		LOG.error(id1.printErrorLocation() + "Invalid Valuetypes for operation");
-		
-		throw new LanguageException(id1.printErrorLocation() + "Invalid Valuetypes for operation",
+		//raise error with id1 location
+		id1.raiseValidateError("Invalid Valuetypes for operation "+v1+" "+v2, false, 
 				LanguageException.LanguageErrorCodes.INVALID_PARAMETERS);
+		return null; //never reached because unconditional
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/01c82f8b/src/main/java/com/ibm/bi/dml/parser/RelationalExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/ibm/bi/dml/parser/RelationalExpression.java b/src/main/java/com/ibm/bi/dml/parser/RelationalExpression.java
index e13dac2..06f76f2 100644
--- a/src/main/java/com/ibm/bi/dml/parser/RelationalExpression.java
+++ b/src/main/java/com/ibm/bi/dml/parser/RelationalExpression.java
@@ -156,7 +156,10 @@ public class RelationalExpression extends Expression
 			output.setDataType(DataType.MATRIX);
 			output.setDimensions(dims[0], dims[1]);
 			output.setBlockDimensions(dims[2], dims[3]);
-			output.setValueType(ValueType.BOOLEAN);
+			
+			//since SystemML only supports double matrices, the value type is forced to
+			//double; once we support boolean matrices this needs to change
+			output.setValueType(ValueType.DOUBLE);
 		}
 		else {
 			output.setBooleanProperties();


[2/2] incubator-systemml git commit: Fix spark instruction parser (missing log_nz opcode)

Posted by mb...@apache.org.
Fix spark instruction parser (missing log_nz opcode) 

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

Branch: refs/heads/master
Commit: a4264859dbfbb9c2e14b56a88361aa28b4e16079
Parents: 01c82f8
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Wed Dec 2 19:02:51 2015 -0800
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Wed Dec 2 19:02:51 2015 -0800

----------------------------------------------------------------------
 .../com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/a4264859/src/main/java/com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java b/src/main/java/com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java
index 95102be..62c49b8 100644
--- a/src/main/java/com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java
+++ b/src/main/java/com/ibm/bi/dml/runtime/instructions/SPInstructionParser.java
@@ -174,6 +174,7 @@ public class SPInstructionParser extends InstructionParser {
 		
 		// Builtin Instruction Opcodes 
 		String2SPInstructionType.put( "log"  , SPINSTRUCTION_TYPE.Builtin);
+		String2SPInstructionType.put( "log_nz"  , SPINSTRUCTION_TYPE.Builtin);
 		
 		String2SPInstructionType.put( "max"  , SPINSTRUCTION_TYPE.BuiltinBinary);
 		String2SPInstructionType.put( "min"  , SPINSTRUCTION_TYPE.BuiltinBinary);