Page MenuHomePhabricator

[mlir][ArmNeon][RFC] Add an ArmNeon dialect

Authored by nicolasvasilache on Nov 26 2020, 3:59 AM.



This revision starts an Arm-specific ArmNeon dialect discussed in the discourse RFC thread.

Diff Detail

Event Timeline

Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nicolasvasilache requested review of this revision.Nov 26 2020, 3:59 AM

What thread was this discussed in?

Update commit message.

rriddle added inline comments.Nov 26 2020, 4:24 AM

Please resolve these TODOs in this commit.


Use isa here instead.

nicolasvasilache edited the summary of this revision. (Show Details)Nov 26 2020, 4:25 AM
aartbik added inline comments.Dec 2 2020, 1:02 PM

This (and other parts) is directly taken from the AVX512 pass. For most part, that is okay with me, but this actually lowering part in AVX512 reflected in these lines of code did not compose very well with the regular vector dialect lowering (which has grown over time with e.g. contract lowering and friends).

Perhaps we can make this part a bit more forward looking on how we want this to run.


AVX -> Neon ;-)

aartbik added inline comments.Dec 3 2020, 9:29 AM

As discussed in the syn meeting, let's not make this a full pass (and also remove the AVX512 pass), but simply keep this as "populate" methods that are pulled in on demand by the regular vector dialect pass. That will avoid copy-and-pasting the logic and avoid inconsistencies over time. The tests can have their own driver, they don't need a full pass either.

As agreed, I will do the AVX512 pass removal in the meanwhile to set the right example.

AVX512 restructuring landed as
Let's follow that structure for all future architectural-dependent vector dialects....

nicolasvasilache marked 5 inline comments as done.Dec 7 2020, 6:05 AM

Address and rebase

Update commit message

nicolasvasilache retitled this revision from [mlir][Neon][RFC] Add a Neon dialect to [mlir][ArmNeon][RFC] Add an ArmNeon dialect.Dec 7 2020, 6:12 AM
nicolasvasilache edited the summary of this revision. (Show Details)
aartbik accepted this revision.Dec 7 2020, 9:50 AM
aartbik added inline comments.
9 ↗(On Diff #309897)

I see a lint warning on this line. Not sure if it is useful?


yes, this is a good point, we should only pull in what is needed

2 ↗(On Diff #309897)

this line is way too long now

This revision is now accepted and ready to land.Dec 7 2020, 9:50 AM
mehdi_amini added inline comments.Dec 7 2020, 1:10 PM

Just don't add it here and implement the override method manually? That way you can check for the options.

ftynse added inline comments.Dec 9 2020, 2:03 AM
24 ↗(On Diff #309897)

Could you specify what are the specific adaptations?

69 ↗(On Diff #309897)

I don't see "different possible target ops" in the code below. Maybe you could rather take/expose OneToOneLLVMConversionPattern?

nicolasvasilache marked 6 inline comments as done.

Address and rebase

24 ↗(On Diff #309897)

just old crap, dropped, thanks!

69 ↗(On Diff #309897)

thanks, much better, paid some of that AVX512 debt too.

Fixes post rebase.

ftynse accepted this revision.Dec 11 2020, 5:42 AM
ftynse added inline comments.
1 ↗(On Diff #311181)

This looks too long

2 ↗(On Diff #311171)

Overflow comment

nicolasvasilache marked an inline comment as done.

Line length.

nicolasvasilache marked an inline comment as done.Dec 11 2020, 5:50 AM
This revision was landed with ongoing or failed builds.Dec 11 2020, 5:51 AM
This revision was automatically updated to reflect the committed changes.
silvas added a subscriber: silvas.Dec 14 2020, 3:19 PM

Did we actually get consensus around the direction here? I didn't see a clear conclusion.