You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by mb...@apache.org on 2023/07/02 19:59:49 UTC
[systemds] branch main updated: [MINOR] Improved mvvar instruction generation, part II
This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push:
new 3ded054093 [MINOR] Improved mvvar instruction generation, part II
3ded054093 is described below
commit 3ded054093b91d4f9ad6893eff0d9eb2fd8cb78d
Author: Matthias Boehm <mb...@gmail.com>
AuthorDate: Sun Jul 2 21:59:26 2023 +0200
[MINOR] Improved mvvar instruction generation, part II
---
src/main/java/org/apache/sysds/lops/compile/Dag.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sysds/lops/compile/Dag.java b/src/main/java/org/apache/sysds/lops/compile/Dag.java
index e96cbd9d78..446fbb16f2 100644
--- a/src/main/java/org/apache/sysds/lops/compile/Dag.java
+++ b/src/main/java/org/apache/sysds/lops/compile/Dag.java
@@ -1051,8 +1051,8 @@ public class Dag<N extends Lop>
&& inst1.getInput1().getName().equals(
((VariableCPInstruction)inst2).getInput1().getName()) ) {
//remove unnecessary rmvar before mvvar
- Instruction last = ret.get(ret.size()-1);
- if( last instanceof VariableCPInstruction
+ Instruction last = ret.size()>0 ? ret.get(ret.size()-1) : null;
+ if( last != null && last instanceof VariableCPInstruction
&& ((VariableCPInstruction)last).isRemoveVariableNoFile()
&& ((VariableCPInstruction)last).getInputs().size() == 1
&& ((VariableCPInstruction)last).getInput1().getName().equals(inst1.getInput2().getName()))