Skip to content

Commit 3dcdea7

Browse files
committed
Change non_volatile to not is_volatile
1 parent 1aa368f commit 3dcdea7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ def AMDGPU_TensorLoadToLDSOp :
14851485
Arguments<(ins AMDGPU_TDMDescriptorType: $desc,
14861486
DefaultValuedOptionalAttr<AMDGPU_CacheScopeAttr, "CacheScope::Workgroup">: $cache_scope,
14871487
DefaultValuedOptionalAttr<AMDGPU_TemporalLoadHintsAttr, "TemporalLoadHints::RegularTemporal">: $temporal_hint,
1488-
DefaultValuedOptionalAttr<BoolAttr, "false">: $non_volatile)> {
1488+
DefaultValuedOptionalAttr<BoolAttr, "true">: $is_volatile)> {
14891489
let summary = "Load tensors from global memory to LDS.";
14901490
let description = [{
14911491
Load tensors of up to five dimensions from global memory to LDS.
@@ -1503,7 +1503,7 @@ def AMDGPU_TensorStoreFromLDSOp :
15031503
Arguments<(ins AMDGPU_TDMDescriptorType: $desc,
15041504
DefaultValuedOptionalAttr<AMDGPU_CacheScopeAttr, "CacheScope::Workgroup">: $cache_scope,
15051505
DefaultValuedOptionalAttr<AMDGPU_TemporalStoreHintsAttr, "TemporalStoreHints::RegularTemporal">: $temporal_hint,
1506-
DefaultValuedOptionalAttr<BoolAttr, "false">: $non_volatile)> {
1506+
DefaultValuedOptionalAttr<BoolAttr, "true">: $is_volatile)> {
15071507

15081508
let summary = "Store tensors from LDS to global memory.";
15091509
let description = [{

mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,9 +2723,9 @@ struct AMDGPUTensorLoadStoreOpLowering
27232723

27242724
ValueRange desc = adaptor.getDesc();
27252725
uint32_t temporalHint = static_cast<uint32_t>(op.getTemporalHint());
2726-
bool nonVolatile = static_cast<bool>(op.getNonVolatile());
2726+
bool isVolatile = !static_cast<bool>(op.getIsVolatile());
27272727
uint32_t cacheScope = static_cast<uint32_t>(op.getCacheScope());
2728-
int32_t cachePolicy = cacheScope | temporalHint << 2 | nonVolatile << 5;
2728+
int32_t cachePolicy = cacheScope | temporalHint << 2 | isVolatile << 5;
27292729

27302730
rewriter.replaceOpWithNewOp<TargetOp>(op, desc[0], desc[1], desc[2],
27312731
desc[3], cachePolicy,

mlir/test/Conversion/AMDGPUToROCDL/gfx1250.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,10 @@ func.func @tensor_load_to_lds(%desc: !amdgpu.tdm_descriptor) {
485485
amdgpu.tensor_load_to_lds %desc { temporal_hint = #amdgpu.temporal_load_hint<nontemporal_highpriority> } : !amdgpu.tdm_descriptor
486486

487487
// CHECK: rocdl.tensor.load.to.lds %[[DGROUPS]]#0, %[[DGROUPS]]#1, %[[DGROUPS]]#2, %[[DGROUPS]]#3 cachepolicy 0 : vector<4xi32>, vector<8xi32>
488-
amdgpu.tensor_load_to_lds %desc { non_volatile = false } : !amdgpu.tdm_descriptor
488+
amdgpu.tensor_load_to_lds %desc { is_volatile = true } : !amdgpu.tdm_descriptor
489489

490490
// CHECK: rocdl.tensor.load.to.lds %[[DGROUPS]]#0, %[[DGROUPS]]#1, %[[DGROUPS]]#2, %[[DGROUPS]]#3 cachepolicy 32 : vector<4xi32>, vector<8xi32>
491-
amdgpu.tensor_load_to_lds %desc { non_volatile = true } : !amdgpu.tdm_descriptor
491+
amdgpu.tensor_load_to_lds %desc { is_volatile = false } : !amdgpu.tdm_descriptor
492492

493493
func.return
494494
}
@@ -537,10 +537,10 @@ func.func @tensor_store_from_lds(%desc: !amdgpu.tdm_descriptor) {
537537
amdgpu.tensor_store_from_lds %desc { temporal_hint = #amdgpu.temporal_store_hint<nontemporal_writeback> } : !amdgpu.tdm_descriptor
538538

539539
// CHECK: rocdl.tensor.store.from.lds %[[DGROUPS]]#0, %[[DGROUPS]]#1, %[[DGROUPS]]#2, %[[DGROUPS]]#3 cachepolicy 0 : vector<4xi32>, vector<8xi32>
540-
amdgpu.tensor_store_from_lds %desc { non_volatile = false } : !amdgpu.tdm_descriptor
540+
amdgpu.tensor_store_from_lds %desc { is_volatile = true } : !amdgpu.tdm_descriptor
541541

542542
// CHECK: rocdl.tensor.store.from.lds %[[DGROUPS]]#0, %[[DGROUPS]]#1, %[[DGROUPS]]#2, %[[DGROUPS]]#3 cachepolicy 32 : vector<4xi32>, vector<8xi32>
543-
amdgpu.tensor_store_from_lds %desc { non_volatile = true } : !amdgpu.tdm_descriptor
543+
amdgpu.tensor_store_from_lds %desc { is_volatile = false } : !amdgpu.tdm_descriptor
544544
func.return
545545
}
546546

0 commit comments

Comments
 (0)