Skip to content

[prefetch]: Add support for prefetching load operations using a tensor of pointers#4064

Merged
etiotto merged 4 commits intomainfrom
etiotto.prefetch_tensor_of_ptrs
May 2, 2025
Merged

[prefetch]: Add support for prefetching load operations using a tensor of pointers#4064
etiotto merged 4 commits intomainfrom
etiotto.prefetch_tensor_of_ptrs

Conversation

@etiotto
Copy link
Copy Markdown
Contributor

@etiotto etiotto commented Apr 30, 2025

Loads with tensor of pointers operands that have been proven to reference memory in row major (and are contained in a scf.for loop) order are now prefetched using 2D prefetching intrinsics.

Note: This PR is derived from PR #3634

…s operand.

Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
@etiotto etiotto self-assigned this Apr 30, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for prefetching load operations using a tensor of pointers with 2D prefetching intrinsics and refactors some helper functions in the conversion to be static. Key changes include:

  • Converting multiple helper methods in BlockIOConversionBase to static functions.
  • Updating PrefetchOpConversion to support regular pointer prefetching by adding a new rewriteRegularPointerPrefetch function and revising matchAndRewrite.
  • Adjusting LoadOpToBlockIOConversion to remove the unreachable error in the tensor pointer branch.
Files not reviewed (1)
  • test/TritonIntelGPU/prefetch-to-llvm.mlir: Language not supported

Comment thread third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp Outdated
Comment thread third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp Outdated
Comment thread third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
etiotto added 2 commits May 1, 2025 14:31
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
if (isTensorPointerType(ptr.getType())) {
// TODO: move the tensor pointer rewrite code here.
return failure();
} else {
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.

these changes are all NFC from here on.

Signed-off-by: Tiotto, Ettore <ettore.tiotto@intel.com>
@etiotto etiotto merged commit 1e4d328 into main May 2, 2025
15 of 16 checks passed
@etiotto etiotto deleted the etiotto.prefetch_tensor_of_ptrs branch May 2, 2025 13:15
@etiotto etiotto linked an issue May 2, 2025 that may be closed by this pull request
@mfrancepillois mfrancepillois restored the etiotto.prefetch_tensor_of_ptrs branch May 14, 2025 11:58
@mfrancepillois mfrancepillois deleted the etiotto.prefetch_tensor_of_ptrs branch May 14, 2025 12:05
david-hls pushed a commit to david-hls/intel-xpu-backend-for-triton that referenced this pull request Jun 18, 2025
1. Add 3d descriptions
2. Add `acc` variable description and supported types.
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.

[Performance] Enable prefetching for tt.load with tensor of pointer

4 participants