Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flang/lib/Evaluate/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,9 @@ struct CollectCudaSymbolsHelper : public SetTraverse<CollectCudaSymbolsHelper,
}
// Overload some of the operator() to filter out the symbols that are not
// of interest for CUDA data transfer logic.
semantics::UnorderedSymbolSet operator()(const DescriptorInquiry &) const {
return {};
}
semantics::UnorderedSymbolSet operator()(const Subscript &) const {
return {};
}
Expand Down
10 changes: 10 additions & 0 deletions flang/test/Lower/CUDA/cuda-data-transfer.cuf
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,13 @@ end subroutine
! CHECK-LABEL: func.func @_QPsub17()
! CHECK: cuf.kernel<<<*, *>>>
! CHECK-NOT: cuf.data_transfer

subroutine sub18()
integer, device, allocatable :: a(:)
integer :: isz

isz = size(a)
end subroutine

! CHECK-LABEL: func.func @_QPsub18()
! CHECK-NOT: cuf.data_transfer