This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Make structured op tests permutation invariant
ClosedPublic

Authored by GMNGeoffrey on Feb 18 2021, 12:07 PM.

Details

Summary

Extracts the relevant dimensions from the map under test to build up the
maps to test against in a permutation-invariant way.

This also includes a fix to the indexing maps used by
isColumnMajorMatmul. The maps as currently written do not describe a
column-major matmul. The linalg named op column_major_matmul has the
correct maps (and notably fails the current test).

If C = matmul(A, B) we want an operation that given A in column major
format and B in column major format produces C in column major format.
Given that for a matrix, faux column major is just transpose.
column_major_matmul(transpose(A), transpose(B)) = transpose(C). If
A is NxK and B is KxM, then C is NxM, so transpose(A) is
KxN, transpose(B) is MxK and transpose(C) is MxN, not NxM
as these maps currently have.

Diff Detail

Event Timeline

GMNGeoffrey created this revision.Feb 18 2021, 12:07 PM
GMNGeoffrey requested review of this revision.Feb 18 2021, 12:07 PM
This revision is now accepted and ready to land.Feb 18 2021, 12:13 PM
GMNGeoffrey edited the summary of this revision. (Show Details)Feb 18 2021, 12:32 PM
GMNGeoffrey edited the summary of this revision. (Show Details)Feb 18 2021, 12:33 PM
GMNGeoffrey edited the summary of this revision. (Show Details)
GMNGeoffrey retitled this revision from Make structured op tests permutation invariant to [MLIR] Make structured op tests permutation invariant.Feb 18 2021, 12:35 PM

Add missing dependency in VectorOps

  • Add missing add_subdirectory

clang-tidy wants an include order that doesn't match https://llvm.org/docs/CodingStandards.html#include-style AFAICT

This revision was landed with ongoing or failed builds.Feb 18 2021, 2:36 PM
This revision was automatically updated to reflect the committed changes.