[jira] [Updated] (SYSTEMML-1434) Generalize Binary Operations to (vector, matrix) Operands
[ https://issues.apache.org/jira/browse/SYSTEMML-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Dusenberry updated SYSTEMML-1434: -- Fix Version/s: SystemML 1.0 > Generalize Binary Operations to (vector, matrix) Operands > - > > Key: SYSTEMML-1434 > URL: https://issues.apache.org/jira/browse/SYSTEMML-1434 > Project: SystemML > Issue Type: Task >Reporter: Mike Dusenberry > Fix For: SystemML 1.0 > > Attachments: broadcasting_test.dml > > > Currently, our engine supports matrix-vector binary operations. For example, > we make use of broadcasting to allow for binary operations between matrices > and vectors that have a common size in each the row or column dimension. > However, we do not support vector-matrix binary operations. > Works correctly --> op(matrix, vector): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = a * b > print(toString(out)) > {code} > Fails --> op(vector, matrix): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = b * a > print(toString(out)) > {code} > {code} > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Exception in thread "main" org.apache.sysml.api.DMLException: > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:364) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : > ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in > dimensions for operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > ... 1 more > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (SYSTEMML-1434) Generalize Binary Operations to (vector, matrix) Operands
[ https://issues.apache.org/jira/browse/SYSTEMML-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Dusenberry updated SYSTEMML-1434: -- Description: Currently, our engine supports matrix-vector binary operations. For example, we make use of broadcasting to allow for binary operations between matrices and vectors that have a common size in each the row or column dimension. However, we do not support vector-matrix binary operations. Works correctly --> op(matrix, vector): {code} a = rand(rows=4, cols=16) b = rand(rows=1, cols=16) out = a * b print(toString(out)) {code} Fails --> op(vector, matrix): {code} a = rand(rows=4, cols=16) b = rand(rows=1, cols=16) out = b * a print(toString(out)) {code} {code} org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a) at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) at org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) at org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) Exception in thread "main" org.apache.sysml.api.DMLException: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:364) at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a) at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) at org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) at org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) ... 1 more {code} was: Currently, we make use of broadcasting to allow for binary operations between matrices and vectors that have a common size in each the row or column dimension. However, there is currently a limitation in which the matrix must be the first argument to the binary operator in order for the broadcasting to take place. Otherwise, in the case of the vector being the first argument, an error will be thrown. NumPy does not have this limitation. Works correctly --> op(matrix, vector): {code} a = rand(rows=4, cols=16) b = rand(rows=1, cols=16) out = a * b print(toString(out)) {code} Fails --> op(vector, matrix): {code} a = rand(rows=4, cols=16) b = rand(rows=1, cols=16) out = b * a print(toString(out)) {code} {code} org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a) at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) at org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) at org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) Exception in thread "main" org.apache.sysml.api.DMLException: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:364) at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for operation (b MULT a)
[jira] [Updated] (SYSTEMML-1434) Generalize Binary Operations to (vector, matrix) Operands
[ https://issues.apache.org/jira/browse/SYSTEMML-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Dusenberry updated SYSTEMML-1434: -- Summary: Generalize Binary Operations to (vector, matrix) Operands (was: Broadcasting Error) > Generalize Binary Operations to (vector, matrix) Operands > - > > Key: SYSTEMML-1434 > URL: https://issues.apache.org/jira/browse/SYSTEMML-1434 > Project: SystemML > Issue Type: Bug >Reporter: Mike Dusenberry > Attachments: broadcasting_test.dml > > > Currently, we make use of broadcasting to allow for binary operations between > matrices and vectors that have a common size in each the row or column > dimension. However, there is currently a limitation in which the matrix must > be the first argument to the binary operator in order for the broadcasting to > take place. Otherwise, in the case of the vector being the first argument, > an error will be thrown. NumPy does not have this limitation. > Works correctly --> op(matrix, vector): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = a * b > print(toString(out)) > {code} > Fails --> op(vector, matrix): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = b * a > print(toString(out)) > {code} > {code} > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Exception in thread "main" org.apache.sysml.api.DMLException: > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:364) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : > ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in > dimensions for operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > ... 1 more > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (SYSTEMML-1434) Generalize Binary Operations to (vector, matrix) Operands
[ https://issues.apache.org/jira/browse/SYSTEMML-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Dusenberry updated SYSTEMML-1434: -- Issue Type: Task (was: Bug) > Generalize Binary Operations to (vector, matrix) Operands > - > > Key: SYSTEMML-1434 > URL: https://issues.apache.org/jira/browse/SYSTEMML-1434 > Project: SystemML > Issue Type: Task >Reporter: Mike Dusenberry > Attachments: broadcasting_test.dml > > > Currently, we make use of broadcasting to allow for binary operations between > matrices and vectors that have a common size in each the row or column > dimension. However, there is currently a limitation in which the matrix must > be the first argument to the binary operator in order for the broadcasting to > take place. Otherwise, in the case of the vector being the first argument, > an error will be thrown. NumPy does not have this limitation. > Works correctly --> op(matrix, vector): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = a * b > print(toString(out)) > {code} > Fails --> op(vector, matrix): > {code} > a = rand(rows=4, cols=16) > b = rand(rows=1, cols=16) > out = b * a > print(toString(out)) > {code} > {code} > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Exception in thread "main" org.apache.sysml.api.DMLException: > org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: > tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in dimensions for > operation (b MULT a) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:364) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:211) > Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : > ERROR: tests/broadcasting_test.dml -- line 4, column 7 -- Mismatch in > dimensions for operation (b MULT a) > at > org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549) > at > org.apache.sysml.parser.BinaryExpression.checkAndSetDimensions(BinaryExpression.java:188) > at > org.apache.sysml.parser.BinaryExpression.validateExpression(BinaryExpression.java:141) > at > org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592) > at > org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:141) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:588) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350) > ... 1 more > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)