Baunsgaard commented on code in PR #2596:
URL: https://github.com/apache/systemds/pull/2596#discussion_r3862476783
##########
src/main/java/org/apache/sysds/conf/DMLConfig.java:
##########
@@ -98,8 +98,9 @@ public class DMLConfig
public static final String NATIVE_BLAS = "sysds.native.blas";
public static final String NATIVE_BLAS_DIR =
"sysds.native.blas.directory";
public static final String DAG_LINEARIZATION =
"sysds.compile.linearization";
- public static final String SPARSITY_REWRITES =
"sysds.rewrites.sparsity.enabled"; // boolean
- public static final String SPARSITY_ESTIMATOR =
"sysds.rewrites.sparsity.estimator"; // see EstiamtionUtils.EstimatorType
+ public static final String SPARSITY_REWRITES =
"sysds.sparsity.rewrites.enabled"; // boolean
+ public static final String SPARSITY_RECOMPILE =
"sysds.sparsity.recompile.enabled"; // boolean
Review Comment:
would it not be better not to rename these environment variables?
Or are they currently not used in the system?
##########
src/main/java/org/apache/sysds/hops/recompile/SparsityDAGRecompiler.java:
##########
Review Comment:
So the idea is to start by targeting mm chains ? and do these based on the
sparsity estimations?
##########
src/main/java/org/apache/sysds/hops/recompile/Recompiler.java:
##########
@@ -387,6 +388,11 @@ else if( !codegen ) {
memo.extract(hops, status);
}
+ // sparsity-based DAG recompilation if enabled
+
if(ConfigurationManager.getDMLConfig().getBooleanValue(DMLConfig.SPARSITY_RECOMPILE))
{
+ hops = SparsityDAGRecompiler.optimize(hops, ec);
+ }
+
Review Comment:
would it not be better to have it as part of the above statistics
optimizations. Since if you change the graph based on the sparsity estimatings
the statistics would also change ?
##########
src/main/java/org/apache/sysds/hops/recompile/Recompiler.java:
##########
Review Comment:
Also be aware of this one. since the rewrites you make above could be
effected by the low level rewrites.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]