Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor AIRLowering pass with mlir typeConverter #644

Merged

Conversation

erwei-xilinx
Copy link
Collaborator

No description provided.

@fifield fifield mentioned this pull request Jul 3, 2024
@@ -28,6 +28,7 @@
"air-dependency",
"air-dependency-schedule-opt",
"air-specialize-dma-broadcast",
"air-dma-to-channel",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it already contain air-dma-to-channel? Do you just need a different order?
Starting about line 375:

        pass_pipeline = ",".join(
            [
                "air-insert-launch-and-segment-around-herd",
                "func.func(air-lower-herd-parallel)",
            ]
            + (
                EXPERIMENTAL_PASSES
                if "npu" in opts.device and opts.experimental_passes
                else []
            )
            + (["air-dma-to-channel"] if "npu" in opts.device else [])
            + [
                "canonicalize",
                "cse",
                "air-specialize-channel-wrap-and-stride",
                "func.func(air-renumber-dma)",
                "func.func(convert-linalg-to-loops)",
                air_place_pass,
            ]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we need air-dma-to-channel to produce us with air.channel ops before the following passes:

    "func.func(air-loop-fusion)",
    "air-label-scf-for-to-ping-pong",
    "air-ping-pong-transform{keep-memref-dealloc=true}",
    "air-isolate-async-dma-loop-nests",

Those passes are for BD optimizations, and they only work on air.channels, because air.dma_memcpy_nd doesn't have explicit handles for BDs.

@erwei-xilinx erwei-xilinx merged commit c6d171d into Xilinx:main Jul 3, 2024
11 checks passed
@erwei-xilinx erwei-xilinx deleted the refactor_air_to_std_with_typeConverter branch July 3, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants