This is an archive of the discontinued LLVM Phabricator instance.

[Matrix] Lowering pass should also run at O0
AbandonedPublic

Authored by SjoerdMeijer on Jul 10 2020, 9:32 AM.

Details

Summary

As the Matrix intrinsic lowering pass is not running at -O0, code using the matrix extension results in a backend crash.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Jul 10 2020, 9:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2020, 9:32 AM

Fix typo in comment.

There is already a patch to run a simple version of the lowering as part of the target pipelines D76858. I didn't land it yet, as I first wanted to come up with a lightweight system to figure out if the lowering pass actually needs to run on a function beforehand, to keep compile times low, if no matrix intrinsics are present. But I did not have time to wrap this up yet.

SjoerdMeijer abandoned this revision.Jul 10 2020, 11:21 AM

Ah okay, cheers, missed that. Time to abandon this.

fhahn added a comment.Jul 16 2020, 4:06 AM

Ah okay, cheers, missed that. Time to abandon this.

I just committed a similar fix upstream, because there are some bots building the test-suite with -O0, to unblock them. The proper fix (run in lightweight lowering in the backend) will need a bit more time unfortunately.

Ah okay, cheers, missed that. Time to abandon this.

I just committed a similar fix upstream, because there are some bots building the test-suite with -O0, to unblock them. The proper fix (run in lightweight lowering in the backend) will need a bit more time unfortunately.

Cheers.
And I will commit the test of this patch then as that still seems useful to me.

Okay, committing the test was an interesting exercise, that show there's a bot running the new pass manager which isn't happy with us:

http://lab.llvm.org:8011/builders/clang-x86_64-debian-new-pass-manager-fast/builds/11859/steps/test-check-all/logs/FAIL%3A%20Clang%3A%3Amatrix-lowering-opt-levels.c

I guess that means we have to sort out the passes for the NPM too @fhahn ?
Probably best if I revert my little test changes for now.

fhahn added a comment.Jul 16 2020, 8:11 AM

Okay, committing the test was an interesting exercise, that show there's a bot running the new pass manager which isn't happy with us:

http://lab.llvm.org:8011/builders/clang-x86_64-debian-new-pass-manager-fast/builds/11859/steps/test-check-all/logs/FAIL%3A%20Clang%3A%3Amatrix-lowering-opt-levels.c

I guess that means we have to sort out the passes for the NPM too @fhahn ?

Oh yes, we need a NPM version of the pass as well.

SjoerdMeijer added a comment.EditedJul 16 2020, 8:50 AM

I needed a few attempts :-( but have left a FIXME in the test case, and have disabled it by commented out the -O0 test in rG0160ad802e89.

Just checking again to avoid duplication: are you looking into enabling this with the NPM too? I wouldn't mind having a look.

fhahn added a comment.Jul 16 2020, 9:04 AM

I needed a few attempts :-( but have left a FIXME in the test case, and have disabled it by commented out the -O0 test in rG0160ad802e89.

Just checking again to avoid duplication: are you looking into enabling this with the NPM too? I wouldn't mind having a look.

I probably won't have time to do so in the next few days, so if you would like to put up a patch, that would be great!

No problem, going to have a look at that.