File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
include/mlir/Dialect/LLVMIR Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ enum NVVMMemorySpace {
35
35
// / Global memory space identifier.
36
36
kGlobalMemorySpace = 1 ,
37
37
// / Shared memory space identifier.
38
- kSharedMemorySpace = 3
38
+ kSharedMemorySpace = 3 ,
39
+ // / Constant memory space identifier.
40
+ kConstantMemorySpace = 4
39
41
};
40
42
41
43
// / Return the element type and number of elements associated with a wmma matrix
Original file line number Diff line number Diff line change 12
12
// ===----------------------------------------------------------------------===//
13
13
14
14
#include " mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h"
15
+ #include " mlir/Dialect/LLVMIR/NVVMDialect.h"
15
16
16
17
#define DEBUG_TYPE " ptx-builder"
17
18
#define DBGS () (llvm::dbgs() << " [" DEBUG_TYPE " ]: " )
26
27
using namespace mlir ;
27
28
using namespace NVVM ;
28
29
29
- static constexpr int64_t kSharedMemorySpace = 3 ;
30
-
31
30
static char getRegisterType (Type type) {
32
31
if (type.isInteger (1 ))
33
32
return ' b' ;
@@ -43,7 +42,7 @@ static char getRegisterType(Type type) {
43
42
return ' d' ;
44
43
if (auto ptr = dyn_cast<LLVM::LLVMPointerType>(type)) {
45
44
// Shared address spaces is addressed with 32-bit pointers.
46
- if (ptr.getAddressSpace () == kSharedMemorySpace ) {
45
+ if (ptr.getAddressSpace () == NVVMMemorySpace:: kSharedMemorySpace ) {
47
46
return ' r' ;
48
47
}
49
48
return ' l' ;
You can’t perform that action at this time.
0 commit comments