Skip to content

Commit d3fe27b

Browse files
committed
[TritonIntelGPUToLLVM] Implement mlir::triton::intel::AllocationAnalysis
This is just a copy of `mlir::triton::AllocationAnalysis` for now. Signed-off-by: victor-eds <[email protected]>
1 parent 08786ac commit d3fe27b

File tree

6 files changed

+640
-2
lines changed

6 files changed

+640
-2
lines changed

include/triton/Analysis/Allocation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ namespace mlir {
1717

1818
namespace triton {
1919
class AllocationAnalysis;
20+
namespace intel {
21+
class AllocationAnalysis;
22+
}
2023

2124
// To convert a tensor from one layout to another, we need to allocate a
2225
// temporary buffer (i.e., scratch buffer) in shared memory. The conversion may
@@ -238,6 +241,7 @@ class Allocation {
238241
size_t sharedMemorySize = 0;
239242

240243
friend class triton::AllocationAnalysis;
244+
friend class triton::intel::AllocationAnalysis;
241245
};
242246

243247
template <>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef TRITON_INTEL_ANALYSIS_ALLOCATION_H
2+
#define TRITON_INTEL_ANALYSIS_ALLOCATION_H
3+
4+
#include "triton/Analysis/Allocation.h"
5+
6+
namespace mlir {
7+
template <>
8+
void Allocation::run<triton::intel::AllocationAnalysis>(
9+
FuncAllocMapT &funcAllocMap);
10+
} // namespace mlir
11+
12+
#endif

0 commit comments

Comments
 (0)