[flang][cuda] Do not consider SHARED array as host array (#120306)
Update the current `FindHostArray` to not return shared array as host array.
This commit is contained in:
parent
97b7bace67
commit
15c61a208f
@ -115,6 +115,7 @@ struct FindHostArray
|
||||
(details->cudaDataAttr() &&
|
||||
*details->cudaDataAttr() != common::CUDADataAttr::Device &&
|
||||
*details->cudaDataAttr() != common::CUDADataAttr::Managed &&
|
||||
*details->cudaDataAttr() != common::CUDADataAttr::Shared &&
|
||||
*details->cudaDataAttr() != common::CUDADataAttr::Unified))) {
|
||||
return &symbol;
|
||||
}
|
||||
|
||||
@ -35,6 +35,13 @@ module m
|
||||
i = threadIdx%x
|
||||
a(i) = i
|
||||
end subroutine
|
||||
|
||||
attributes(global) subroutine sharedarray(a)
|
||||
integer, device :: a(10)
|
||||
integer, shared :: s(10)
|
||||
i = threadIdx%x
|
||||
a(i) = s(10) ! ok, a is device and s is shared
|
||||
end subroutine
|
||||
end
|
||||
|
||||
program main
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user