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

[ObjectFifo][AMDAIEInsertCores] Fail gracefully when there is no thread mapping #623

Closed
wants to merge 5 commits into from

Conversation

newling
Copy link
Contributor

@newling newling commented Jul 31, 2024

This PR

  1. improves failure mode encountered in Failure running conv2d i32 with objectFifo #619
  2. changes logic to only process the inner-most forall loop(s) with thread mappings

@yzhang93
Copy link
Contributor

InsertCores pass needs thread mapping attribute to work. If not, it needs to emit error instead of silently continue.

Currently we are not using mapping attributes for Conv ops (https://github.com/nod-ai/iree-amd-aie/blob/main/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIETileAndFuse.cpp#L170), because there could be four parallel tiling dimensions. While for gpu mapping attributes there are only three dimensions [x, y, z].

@MaheshRavishankar
Copy link
Collaborator

Fly by comment, I think the crash is probably closer to expected behavior. It shouldnt crash, but should probably be an error. What you need to do to map the four dimensions on two dimension is to linearize the parallel dimensions to 1D and then delinearize to 2D (just emit the indexing map that does this linearization/delinearization).

@newling newling changed the title [ObjectFifo][AMDAIEInsertCores] Do not crash if Forall has no mapping [ObjectFifo][AMDAIEInsertCores] Fail gracefully when there is no thread mapping Aug 1, 2024
@newling newling closed this Aug 12, 2024
@newling newling deleted the towards_convs branch August 29, 2024 18:25
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.

3 participants