The patch updates the C++ yaml code generation to support scalar operands as added in https://reviews.llvm.org/D104220.
Some nits and notes for the future. I like that this enables scalars and is much simpler than where the capture work was headed.
Need to verify with the rest of this patch that this change in dims is intentional.
Note for a follow-on patch: I believe this test file should be moved to the integration test directory.
Why switch this to an std::vector? (I know there are valid reasons to do so in this module, such as with type recursion, but I'm not seeing the rationale for this case)
I believe you removed the temporary option above. Remove from this (now stale) comment?
I swapped the shape since the input I is read transposed (the indexing map is also swapped). It has no direct effect here since we only test the yaml to c++ translation.
@stellaraccident Would you move it under a new integration test directory in the python subfolder (e.g. mlir/python/test/integration) or in the existing integration test directory (e.g. mlir/test/integration). I think having all python code in the same subfolder (mlir/python/) seems preferable?
When using SmallVector<ScalarAssign> I ran into a problem with a static assert checking the size (on Windows only). Setting a fixed size resolved the problem and may overall be more consistent. I just thought std::vector is more on the safe side since struct is big (close to 256 Byte). But assuming the parent struct is most likely heap allocated I think using inline storage is fine.