[Mlir] Support buffer_at with SDist#62
Conversation
| graph_backend = cast(MlirGraphBackend, self._mlir_schedule.scheduler.backend) | ||
| node_backend = cast(MlirNodeBackend, graph_backend.nodes[schedule.node_name]) |
There was a problem hiding this comment.
to pass the pyright type checks
There was a problem hiding this comment.
Could you use assert isinstance(var,type) instead ? Imho cast is ambiguous (in terms of intent)
| memref.ApplyFoldMemrefAliasOpsPatternsOp() | ||
| if "sdist" in self._mlir_program.mlir_extensions: | ||
| assert sdist_transform is not None | ||
| sdist_transform.SDistLocalBufferAtOp( |
There was a problem hiding this comment.
What does it do under the hood ?
There was a problem hiding this comment.
It uses the same SDist primitive as pack_at, which automatically creates a local buffer at a particular loop level. The transformation automatically infer which buffer is a read and/or write.
There was a problem hiding this comment.
Ok could you test the pipeline at different levels, aka transform, then transformed ?
There was a problem hiding this comment.
Why not, but SDist is not tested in CI. Maybe We should ask @guillon how to test XTC also with SDist
There was a problem hiding this comment.
Yes if we use it for all targets we should test it
|
Could you provide small, self-contained filecheck tests for this feature ? For instance in tests/filecheck/mlir_loop |
|
I can create tests equivalents to |
ok! |
Motivation
Propose an implementation of
buffer_atin the Mlir backend.Description
Support the
buffer_atscheduling primitive using SDistCommits
Single commit
Discussion
Like
pack_at, the implementation does nothing if SDist is not installed