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

[Codegen] Replace LLVMGPUVectorize with LLVMGPUTileAndFuse for supported cases #18474

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

qedawkins
Copy link
Contributor

The plan is to deprecate the LLVMGPUVectorize pipeline as it is no
longer maintained. This patch is the first step towards deprecating it.
The pipeline is still used by default for convolutions (if
LLVMGPUVectorDistribute does not pick it up).

  1. (this) Replace default use cases of LLVMGPUVectorize with
    LLVMGPUTileAndFuse.
  2. Replace convolution focused uses of LLVMGPUVectorize.
  3. Separate out the lowering config logic for pre-bufferized dispatches
    (that targets LLVMGPUBaseDistribute).
  4. Delete the vectorize pipeline.

This adds direct support for bufferizing iree_gpu.barrier_region. Now we
can directly handle this operation during bufferization rather than
requiring it to be decomposed before lowering.

For now this simply bufferizes to two barriers at the beginning and the
end of the region. In the future we could opt to either keep the region,
allowing for some additional analysis, or drop the barriers in certain
cases. Those options are left as TODO and this is kept simple for now.
The way that barriers are currently inserted for forall fusion is
fragile and trying to model "WaR" conflicts on tensors (kind of). We
instead want to put the barrier around the body of the whole scf.forall.

See this comment: iree-org#18490 (comment)
…ted cases

The plan is to deprecate the LLVMGPUVectorize pipeline as it is no
longer maintained. This patch is the first step towards deprecating it.
The pipeline is still used by default for convolutions (if
LLVMGPUVectorDistribute does not pick it up).

1) (this) Replace default use cases of LLVMGPUVectorize with
   LLVMGPUTileAndFuse.
2) Replace convolution focused uses of LLVMGPUVectorize.
3) Separate out the lowering config logic for pre-bufferized dispatches
   (that targets LLVMGPUBaseDistribute).
4) Delete the vectorize pipeline.
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.

1 participant