Skip to content

Add support for unstructured masks in MaskAnalysis#333

Merged
bmyerz0 merged 4 commits intomicrosoft:mainfrom
python3kgae:generic_mask
Sep 3, 2025
Merged

Add support for unstructured masks in MaskAnalysis#333
bmyerz0 merged 4 commits intomicrosoft:mainfrom
python3kgae:generic_mask

Conversation

@python3kgae
Copy link
Copy Markdown
Contributor

@python3kgae python3kgae commented Aug 22, 2025

  • Enhanced MaskAnalysis to handle unstructured masks. MaskState will save unstructured mask for a dimension if that dimension failed MaskAnalysis.
  • Updated TritonStructuredDialect to include gather_scatter_mask in MakeGatherScatterTensorPtrOp.
  • Modified PtrAnalysis to apply unstructured masks during pointer analysis.
  • Extended StructuredToMemref conversion to support generic masks in load/store operations.
  • Added verification logic for MakeGatherScatterTensorPtrOp to ensure compatibility with masks.

- Enhanced `MaskAnalysis` to handle generic masks.
  MaskState will save generic mask for a dimension if that dimension failed MaskAnalysis.
- Updated `TritonStructuredDialect` to include `gather_scatter_mask` in `MakeGatherScatterTensorPtrOp`.
- Modified `PtrAnalysis` to apply generic masks during pointer analysis.
- Extended `StructuredToMemref` conversion to support generic masks in load/store operations.
- Added verification logic for `MakeGatherScatterTensorPtrOp` to ensure compatibility with masks.
Comment thread python/examples/test_generic_mask.py
Comment thread python/examples/test_generic_mask.py Outdated
Comment thread include/triton-shared/Analysis/MaskAnalysis.h
Comment thread test/Conversion/TritonToStructured/generic_mask_2d_kernel.mlir Outdated
Comment thread test/Conversion/TritonToStructured/generic_mask_2d_kernel.mlir
Comment thread lib/Analysis/MaskAnalysis.cpp
Comment thread lib/Analysis/MaskAnalysis.cpp Outdated
Comment thread python/examples/test_generic_mask.py Outdated
Comment thread python/examples/test_generic_mask.py Outdated
Comment thread python/examples/test_generic_mask.py
Comment thread python/examples/test_generic_mask.py
Comment thread lib/Analysis/MaskAnalysis.cpp
Xiang Li added 2 commits August 29, 2025 15:11
Also fix the offset divide stride issue when convert tts::MakeTensorPtrOp to tts::MakeGatherScatterTensorPtrOp.
@python3kgae python3kgae changed the title Add support for generic masks in MaskAnalysis Add support for unstructured masks in MaskAnalysis Aug 29, 2025
Comment thread lib/AnalysisStructured/PtrAnalysis.cpp
@bmyerz0 bmyerz0 enabled auto-merge (squash) September 3, 2025 19:03
@bmyerz0 bmyerz0 merged commit 2b728ad into microsoft:main Sep 3, 2025
3 checks passed
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