[all-commits] [llvm/llvm-project] 2b28d1: [mlir][SCF][GPU] Add DeviceMaskingAttrInterface (#...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon Jul 7 09:07:03 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b28d100226bcf6710851137c31080cc670196d6
      https://github.com/llvm/llvm-project/commit/2b28d100226bcf6710851137c31080cc670196d6
  Author: Nicolas Vasilache <Nico.Vasilache at amd.com>
  Date:   2025-07-07 (Mon, 07 Jul 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/IR/GPUDeviceMappingAttr.td
    M mlir/include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h
    M mlir/include/mlir/Dialect/GPU/TransformOps/Utils.h
    M mlir/include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td
    M mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
    M mlir/lib/Dialect/GPU/TransformOps/Utils.cpp
    M mlir/lib/Dialect/SCF/IR/SCF.cpp
    M mlir/test/Dialect/GPU/transform-gpu-failing.mlir
    M mlir/test/Dialect/GPU/transform-gpu.mlir
    M mlir/test/Dialect/SCF/invalid.mlir

  Log Message:
  -----------
  [mlir][SCF][GPU] Add DeviceMaskingAttrInterface (#146943)

This revision adds DeviceMaskingAttrInterface and extends
DeviceMappingArrayAttr to accept a union of DeviceMappingAttrInterface
and DeviceMaskingAttrInterface.

Support is added to GPUTransformOps to take advantage of this
information and lower to block/warpgroup/warp/thread specialization when
mapped to linear ids.

The revision also connects to scf::ForallOp and uses the new attribute
to implement warp specialization.
The implementation is in the form of a GPUMappingMaskAttr, which can be
additionally passed to the scf.forall.mapping attribute to specify a
mask on compute resources that should be active.

In the first implementation the masking is a bitfield that specifies for
each processing unit whether it is active or not.
In the future, we may want to implement this as a symbol to refer to
dynamically defined values.
Extending op semantics with an operand is deemed too intrusive at this
time.

---------

Co-authored-by: Oleksandr "Alex" Zinenko <git at ozinenko.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list