[ https://issues.apache.org/jira/browse/SYSTEMML-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260484#comment-15260484 ]
Mike Dusenberry commented on SYSTEMML-652: ------------------------------------------ [~mboehm7], yeah I encountered this with the latest master yesterday. Glad that the problem was determined. I definitely think we need to allow for function calls in expressions, and I think we also need to place more focus on the integration of functions with the rest of the optimizer - i.e. valid rewrites such as the update-in-place in SYSTEMML-633 should be applied to functions. Otherwise, it makes it quite difficult to build libraries that have any reasonable performance, and I think that hurts the project and the idea of declarative ML overall. > Left-Indexing With Result of DML Function Changes Matrix Size > ------------------------------------------------------------- > > Key: SYSTEMML-652 > URL: https://issues.apache.org/jira/browse/SYSTEMML-652 > Project: SystemML > Issue Type: Bug > Components: Compiler > Affects Versions: SystemML 0.9, SystemML 0.10 > Reporter: Mike Dusenberry > > I've found a bug in which assigning the result of a DML function to a portion > of a matrix with left-indexing results in the left-hand matrix being reduced > in size dimensionally. This bug was encountered while working on the deep > learning DML library, and the following simplified example aims to provide a > simple, reproducible example. > Given the following code, > {code} > N = 3 > M = 5 > forward = function(matrix[double] X) return (matrix[double] out) { > out = 1 / (1 + exp(-X)) > } > X = rand(rows=N, cols=M) > X[,1:2] = forward(X[,1:2]) > print("X1: " + nrow(X) + "x" + ncol(X)) > if(1==1){} > X = rand(rows=N, cols=M) > temp = forward(X[,1:2]) > X[,1:2] = temp > print("X2: " + nrow(X) + "x" + ncol(X)) > if(1==1){} > print("") > {code} > , notice that {{X}} should always be a {{3x5}} matrix, as both cases are > equivalent. However, in the first case, {{X}} is truncated to a {{3x2}} > matrix: > {code} > X1: 3x2 > X2: 3x5 > {code} > Note: The {{if(1==1){}}} statements are included because otherwise the print > statements are executed out of order. -- This message was sent by Atlassian JIRA (v6.3.4#6332)