================
@@ -407,6 +407,62 @@ __host__ __device__ int Four(void) __attribute__((weak, 
alias("_Z6__Fourv")));
 __host__ __device__ float Four(float f) __attribute__((weak, 
alias("_Z6__Fourf")));
 ```
 
+## Managed Variables
+
+The `__managed__` attribute can be applied to a global variable to indicate 
that
+the variable's memory is accessible by both host and device.
+A managed variable is emitted as an undefined global symbol in the device 
binary
+and is registered with the HIP runtime by `__hipRegisterManagedVariable` in the
+module init functions.
----------------
Fznamznon wrote:

@yxsamliu , I changed the doc, could you please double check that it is ok now?
I also fixed the doc for managed attribute because it confused me with function 
name.

https://github.com/llvm/llvm-project/pull/217047
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to