This is an archive of the discontinued LLVM Phabricator instance.

[Polly] [DependenceInfo] Less restrictive matrix-multiplication pattern match
AbandonedPublic

Authored by bollu on Apr 18 2017, 1:37 AM.

Details

Summary

The surrounding code should make sure that the weakened
dependence check for matrix multiplication like operations will work.

This generalises the check to work in more cases than before.

Event Timeline

bollu created this revision.Apr 18 2017, 1:37 AM
bollu retitled this revision from [DependenceInfo] Less restrictive matrix-multiplication pattern match to [Polly] [DependenceInfo] Less restrictive matrix-multiplication pattern match.Apr 18 2017, 1:43 AM
grosser edited edge metadata.Apr 18 2017, 2:49 AM

Great. Can you add a RUN line that enables memory based dependences to show that this actually works. Also please mention in the commit log that the pattern matching does currently not work for memory based dependence.

bollu abandoned this revision.Apr 18 2017, 6:57 AM

This doesn't work for memory based analysis:
When we do memory based analysis, we have widened RAW, WAR, and WAW dependence. However, RED dependences are not widened. This leads to a case where the schedule is still restricted by WAR and WAW dependences.

	WAR dependences:
		{ Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, o2] : 0 <= i0 <= 2999 and 0 <= i1 <= 2999 and 0 <= i2 <= 2999 and 0 <= o2 <= 2999 and (o2 >= 2 or (i2 <= 2997 and o2 <= 2998)) }
	WAW dependences:
		{ Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, o2] : 0 <= i0 <= 2999 and 0 <= i1 <= 2999 and 0 <= i2 <= 2999 and 0 <= o2 <= 2999 and (o2 >= 2 or (i2 <= 2997 and o2 <= 2998)) }
	Reduction dependences:
		{ Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, 1 + i2] : 0 <= i0 <= 2999 and 0 <= i1 <= 2999 and 0 <= i2 <= 2998 }
	Transitive closure of reduction dependences:
		{ Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, o2] : 0 <= i0 <= 2999 and 0 <= i1 <= 2999 and ((i2 >= 0 and i2 < o2 <= 2999) or (i2 <= 2999 and 0 <= o2 < i2)) }