Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A4F9D200CA4 for ; Wed, 24 May 2017 08:05:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A41BB160BD9; Wed, 24 May 2017 06:05:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB727160BC3 for ; Wed, 24 May 2017 08:05:07 +0200 (CEST) Received: (qmail 69034 invoked by uid 500); 24 May 2017 06:05:06 -0000 Mailing-List: contact issues-help@systemml.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.apache.org Delivered-To: mailing list issues@systemml.apache.org Received: (qmail 69025 invoked by uid 99); 24 May 2017 06:05:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2017 06:05:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 80CBDC1471 for ; Wed, 24 May 2017 06:05:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6Yxdp7ZIdwTP for ; Wed, 24 May 2017 06:05:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 04A7C5FD38 for ; Wed, 24 May 2017 06:05:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7FD8BE06C2 for ; Wed, 24 May 2017 06:05:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3B8AD21B58 for ; Wed, 24 May 2017 06:05:04 +0000 (UTC) Date: Wed, 24 May 2017 06:05:04 +0000 (UTC) From: "Matthias Boehm (JIRA)" To: issues@systemml.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (SYSTEMML-1621) `max(0, X)` fails with type mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 24 May 2017 06:05:08 -0000 [ https://issues.apache.org/jira/browse/SYSTEMML-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthias Boehm resolved SYSTEMML-1621. -------------------------------------- Resolution: Fixed > `max(0, X)` fails with type mismatch > ------------------------------------ > > Key: SYSTEMML-1621 > URL: https://issues.apache.org/jira/browse/SYSTEMML-1621 > Project: SystemML > Issue Type: Bug > Reporter: Mike Dusenberry > Assignee: Matthias Boehm > Fix For: SystemML 1.0 > > > Scenario: Compute the element-wise max of a matrix {{X}} and {{0}}. > Current behavior: {{max(0, X)}} fails, {{max(0.0, X)}} works, and {{max(X, 0)}} works as well. > Desired behavior: {{max(0, X)}} should work. > How to reproduce: {{nn/layers/relu.dml::forward}} currently contains a {{max(X, 0)}} function call. When the tests ({{test/integration/scripts/nn/NNTest.java}}) are run, everything works fine. However, if this function is adjusted to be {{max(0, X)}}, the tests will fail during parsing with the following error: > {code} > 17/05/23 11:17:00 ERROR parser.StatementBlock: ERROR: ./nn/test/grad_check.dml -- line 1729, column 2 -- for function two_layer_affine_l2_net_forward, return variable aout value type of INT does not match value type in function signature of DOUBLE and cannot safely cast double as int > 17/05/23 11:17:00 ERROR api.DMLScript: Failed to execute DML script. > org.apache.sysml.parser.LanguageException: ERROR: ./nn/test/grad_check.dml -- line 1729, column 2 -- for function two_layer_affine_l2_net_forward, return variable aout value type of INT does not match value type in function signature of DOUBLE and cannot safely cast INT as DOUBLE > at org.apache.sysml.parser.FunctionStatementBlock.validate(FunctionStatementBlock.java:155) > at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:133) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:758) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:506) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:233) > Exception in thread "main" org.apache.sysml.api.DMLException: org.apache.sysml.parser.LanguageException: ERROR: ./nn/test/grad_check.dml -- line 1729, column 2 -- for function two_layer_affine_l2_net_forward, return variable aout value type of INT does not match value type in function signature of DOUBLE and cannot safely cast INT as DOUBLE > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:533) > at org.apache.sysml.api.DMLScript.main(DMLScript.java:233) > Caused by: org.apache.sysml.parser.LanguageException: ERROR: ./nn/test/grad_check.dml -- line 1729, column 2 -- for function two_layer_affine_l2_net_forward, return variable aout value type of INT does not match value type in function signature of DOUBLE and cannot safely cast INT as DOUBLE > at org.apache.sysml.parser.FunctionStatementBlock.validate(FunctionStatementBlock.java:155) > at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:133) > at org.apache.sysml.api.DMLScript.execute(DMLScript.java:758) > at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:506) > ... 1 more > Failed to run SystemML. Exit code :256 > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)