Skip to content

Reorganize gpu-transforms - #482

Merged
dchigarev merged 1 commit into
mainfrom
dchigarev/reorganize-gpu-transforms
Dec 1, 2026
Merged

dchigarev merged 1 commit into
mainfrom
dchigarev/reorganize-gpu-transforms

Conversation

@dchigarev

@dchigarev dchigarev commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Source files are grouped by the pipeline phase they belong to, matching the phase(...) names in Pipeline.cpp.

lib/gc/Transforms/GPU/
├── CMakeLists.txt
├── Pipeline.cpp                      # gc-gpu-pipeline definition and dialect registry
│
├── Preprocess/                       # "Preprocess" + "Decomposition" phases (tensor/linalg level, target-agnostic)
│   ├── GpuDeviceProps.cpp
│   ├── TensorConcatToLinalg.cpp
│   ├── TensorReshapeToLinalg.cpp
│   └── Decomposition.cpp
│
├── Tiling/                           # "Tiling" phase (renamed from tiling/)
│   ├── TilingUtils.h
│   ├── TileContraction.cpp
│   ├── TileGroupedMatmul.cpp
│   ├── TileAttention.cpp
│   ├── TileParallel.cpp
│   ├── GuardEmptyTiles.cpp
│   └── SetKernelDepends.cpp
│
├── Padding/                          # "Padding" phase
│   ├── ApplyPaddingLevel.cpp
│   ├── TensorMaskingOpInterface.cpp
│   ├── HoistStaticForInit.cpp
│   └── FoldPadRoundtrip.cpp
│
├── Vectorization/                    # "Vectorization" phase
│   ├── SimplifyIndexingMaps.cpp
│   ├── Vectorize.cpp
│   ├── HoistForLoopTransferRead.cpp
│   └── PeeledForToIf.cpp
│
├── Bufferization/                    # memref cleanup after one-shot bufferization
│   ├── RemoveAllocs.cpp
│   ├── DropUnitDims.cpp
│   └── NormalizeMemrefLayouts.cpp
│
├── XeGPU/                            # "KernelOutlining" + "VectorToXegpu" phases
│   ├── GpuKernelOutline.cpp
│   ├── SetGpuFastMath.cpp
│   ├── SetLayouts.cpp
│   └── Attention/                    # moved from AttentionOptimizations/
│       ├── AttentionUtils.h          # moved from include/gc/Transforms/GPU/AttentionOptimizations/Utils.h
│       ├── AttentionUtils.cpp        # renamed from Utils.cpp
│       ├── HoistAttentionVLoad.cpp
│       ├── SetAttentionPrefetch.cpp
│       └── SetAttentionLayouts.cpp
│
└── Host/                             # host-side lowering to GpuRuntime calls (target-agnostic)
    ├── MemrefCopyToGpuMemcpy.cpp
    └── GpuToGcGpu.cpp

New passes in #439 can go to a separate lib/gc/Transforms/GPU/Portable folder

Other changes

  • Lit tests follow the same layout.
  • Passes.td is still one file. Pass definitions are reordered into commented sections, one per folder, in pipeline order.

Comment on lines +37 to +42
def TensorConcatToLinalg : Pass<"tensor-concat-to-linalg", "func::FuncOp"> {
let summary = "Convert tensor.concat to linalg operations.";
let description = [{
Eliminate tensor.concat by routing producers into output subviews
or convert to linalg.copy.
}];

@dchigarev dchigarev Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the text is unchanged, the diff just moves the passes inside of the file

@dchigarev
dchigarev marked this pull request as ready for review November 30, 2026 19:23
@dchigarev
dchigarev force-pushed the dchigarev/reorganize-gpu-transforms branch from 168cafc to 763e1e9 Compare December 1, 2026 09:11
@dchigarev
dchigarev force-pushed the dchigarev/reorganize-gpu-transforms branch from 763e1e9 to 0203d66 Compare December 1, 2026 21:11
Signed-off-by: Chigarev <dmitry.chigarev@intel.com>
@dchigarev
dchigarev force-pushed the dchigarev/reorganize-gpu-transforms branch from 0203d66 to 80fcb25 Compare December 1, 2026 22:34
@dchigarev
dchigarev merged commit 1248d38 into main Dec 1, 2026
6 checks passed
@dchigarev
dchigarev deleted the dchigarev/reorganize-gpu-transforms branch December 1, 2026 23:21
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.

2 participants