You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ba...@apache.org on 2023/10/30 12:51:27 UTC

(systemds) branch main updated: [MINOR] Refine Error on Scalar compression

This is an automated email from the ASF dual-hosted git repository.

baunsgaard 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 8ca0bf1eb4 [MINOR] Refine Error on Scalar compression
8ca0bf1eb4 is described below

commit 8ca0bf1eb4e4e5c55f4aa610d2cc54ce9705b77b
Author: Sebastian Baunsgaard <ba...@apache.org>
AuthorDate: Mon Oct 30 13:51:01 2023 +0100

    [MINOR] Refine Error on Scalar compression
---
 .../runtime/instructions/cp/CompressionCPInstruction.java      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sysds/runtime/instructions/cp/CompressionCPInstruction.java b/src/main/java/org/apache/sysds/runtime/instructions/cp/CompressionCPInstruction.java
index b59e4d9db8..c9dd5c8961 100644
--- a/src/main/java/org/apache/sysds/runtime/instructions/cp/CompressionCPInstruction.java
+++ b/src/main/java/org/apache/sysds/runtime/instructions/cp/CompressionCPInstruction.java
@@ -22,6 +22,7 @@ package org.apache.sysds.runtime.instructions.cp;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.lang3.NotImplementedException;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -122,10 +123,13 @@ public class CompressionCPInstruction extends ComputationCPInstruction {
 
 		final int k = OptimizerUtils.getConstrainedNumThreads(-1);
 
-		if(ec.isMatrixObject(input1.getName()))
-			processMatrixBlockCompression(ec, ec.getMatrixInput(input1.getName()), k, root);
-		else
+		if(ec.isFrameObject(input1.getName()))
 			processFrameBlockCompression(ec, ec.getFrameInput(input1.getName()), k, root);
+		else if(ec.isMatrixObject(input1.getName()))
+			processMatrixBlockCompression(ec, ec.getMatrixInput(input1.getName()), k, root);
+		else{
+			throw new NotImplementedException("Not supported other types of input for compression than frame and matrix");
+		}
 	}
 
 	private void processMatrixBlockCompression(ExecutionContext ec, MatrixBlock in, int k, WTreeRoot root) {