Skip to content

Commit 415cfaf

Browse files
authored
[flang][cuda][NFC] Fix type in CUFFreeDescriptor (#120799)
1 parent 78ab771 commit 415cfaf

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

flang/include/flang/Runtime/CUDA/descriptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Descriptor *RTDECL(CUFAllocDescriptor)(
2222
std::size_t, const char *sourceFile = nullptr, int sourceLine = 0);
2323

2424
/// Deallocate a descriptor allocated in managed or unified memory.
25-
void RTDECL(CUFFreeDesciptor)(
25+
void RTDECL(CUFFreeDescriptor)(
2626
Descriptor *, const char *sourceFile = nullptr, int sourceLine = 0);
2727

2828
/// Retrieve the device pointer from the host one.

flang/lib/Optimizer/Transforms/CUFOpConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ struct CUFFreeOpConversion : public mlir::OpRewritePattern<cuf::FreeOp> {
451451

452452
// Convert cuf.free on descriptors.
453453
mlir::func::FuncOp func =
454-
fir::runtime::getRuntimeFunc<mkRTKey(CUFFreeDesciptor)>(loc, builder);
454+
fir::runtime::getRuntimeFunc<mkRTKey(CUFFreeDescriptor)>(loc, builder);
455455
auto fTy = func.getFunctionType();
456456
mlir::Value sourceLine =
457457
fir::factory::locationToLineNo(builder, loc, fTy.getInput(2));

flang/runtime/CUDA/descriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Descriptor *RTDEF(CUFAllocDescriptor)(
2323
return reinterpret_cast<Descriptor *>(CUFAllocManaged(sizeInBytes));
2424
}
2525

26-
void RTDEF(CUFFreeDesciptor)(
26+
void RTDEF(CUFFreeDescriptor)(
2727
Descriptor *desc, const char *sourceFile, int sourceLine) {
2828
CUFFreeManaged(reinterpret_cast<void *>(desc));
2929
}

flang/test/Fir/CUDA/cuda-allocate.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func.func @_QPsub1() {
2424
// CHECK: %[[BOX_NONE:.*]] = fir.convert %[[DECL_DESC]]#1 : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>) -> !fir.ref<!fir.box<none>>
2525
// CHECK: %{{.*}} = fir.call @_FortranAAllocatableDeallocate(%[[BOX_NONE]], %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) : (!fir.ref<!fir.box<none>>, i1, !fir.box<none>, !fir.ref<i8>, i32) -> i32
2626
// CHECK: %[[BOX_NONE:.*]] = fir.convert %[[DECL_DESC]]#1 : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>) -> !fir.ref<!fir.box<none>>
27-
// CHECK: fir.call @_FortranACUFFreeDesciptor(%[[BOX_NONE]], %{{.*}}, %{{.*}}) : (!fir.ref<!fir.box<none>>, !fir.ref<i8>, i32) -> none
27+
// CHECK: fir.call @_FortranACUFFreeDescriptor(%[[BOX_NONE]], %{{.*}}, %{{.*}}) : (!fir.ref<!fir.box<none>>, !fir.ref<i8>, i32) -> none
2828

2929
fir.global @_QMmod1Ea {data_attr = #cuf.cuda<device>} : !fir.box<!fir.heap<!fir.array<?xf32>>> {
3030
%0 = fir.zero_bits !fir.heap<!fir.array<?xf32>>

flang/unittests/Runtime/CUDA/AllocatorCUF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ TEST(AllocatableCUFTest, DescriptorAllocationTest) {
6868
Descriptor *desc = nullptr;
6969
desc = RTNAME(CUFAllocDescriptor)(a->SizeInBytes());
7070
EXPECT_TRUE(desc != nullptr);
71-
RTNAME(CUFFreeDesciptor)(desc);
71+
RTNAME(CUFFreeDescriptor)(desc);
7272
}

0 commit comments

Comments
 (0)