Skip to content

Commit cac4797

Browse files
committed
set matrixobject characterstics to avoid recompilation
1 parent 6c24e03 commit cac4797

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/apache/sysds/runtime/instructions/cp/VariableCPInstruction.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,15 @@ else if( getInput1().getDataType() == DataType.MATRIX ) {
10691069
MatrixCharacteristics mc = new MatrixCharacteristics(nrows, ncols, blen, totalNnz);
10701070
HDFSTool.writeMetaDataFile(fname + ".mtd", mo.getValueType(), mc, fmt);
10711071

1072+
// 1. Update the metadata of the MatrixObject in the symbol table.
1073+
mo.updateDataCharacteristics(mc);
1074+
System.out.println("MO characterstics updated to avoid recompilation");
1075+
1076+
// 2. Clear its dirty flag and update its file path to the result we just wrote.
1077+
// This tells the system that the data for this variable now lives in 'fname'.
1078+
mo.setFileName(fname);
1079+
mo.setDirty(false);
1080+
10721081
}
10731082
catch(Exception ex) {
10741083
throw new DMLRuntimeException("Failed to write OOC stream to " + fname, ex);

0 commit comments

Comments
 (0)