This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Python][linalg] Fix to limit size of SmallVector.
ClosedPublic

Authored by gysit on May 19 2021, 11:35 PM.

Details

Summary

Stack allocate at most two ScalarAssign elements. Using the default number of inlined elements triggered a static assert in some setups (https://reviews.llvm.org/D102075).

Diff Detail

Event Timeline

gysit created this revision.May 19 2021, 11:35 PM
gysit requested review of this revision.May 19 2021, 11:35 PM
This revision is now accepted and ready to land.May 20 2021, 12:17 AM
This revision was automatically updated to reflect the committed changes.

That seems fairly ad-hoc as a fix: what are the conditions where this is a problem more precisely?

That seems fairly ad-hoc as a fix: what are the conditions where this is a problem more precisely?

I was only able to repro on Windows debug. See here: https://reviews.llvm.org/D102075#2769791

That seems fairly ad-hoc as a fix: what are the conditions where this is a problem more precisely?

On some systems (windows debug) ScalarAssign is > 256 bytes. On Linux we are slightly below. For example, since the nested std::vector carries more debug info. In case the struct continuous to grow we probably want to switch to std::vector.