SWDEV-406233 - Add notes on hipMemoryType and PointerGetAttributes API for unsupported cuda enum

Change-Id: I1175c12a55c7cd306a5aed3f1a400ae7525f4cb5
Cette révision appartient à :
Julia Jiang a créé et Julia Jiang a révisé 2023-09-06 11:49:15 -04:00
1 Parent d8ce5a0271
révision fffa5eab08
2 fichiers modifiés
+16 -5

Aucun fichier ne correspond à votre recherche

+3 -2
Voir le fichier
@@ -461,11 +461,12 @@ In this case, memory type translation for hipPointerGetAttributes needs to be ha
So in any HIP applications which use HIP APIs involving memory types, developers should use #ifdef in order to assign the correct enum values depending on Nvidia or AMD platform.
As an example, please see the code from the link,
github.com/ROCm-Developer-Tools/HIP/blob/develop/tests/catch/unit/memory/hipMemcpyParam2D.cc#L77-L96.
As an example, please see the code from the [link](github.com/ROCm-Developer-Tools/HIP/blob/develop/tests/catch/unit/memory/hipMemcpyParam2D.cc).
With the #ifdef condition, HIP APIs work as expected on both AMD and NVIDIA platforms.
Note, cudaMemoryType enum value cudaMemoryTypeUnregstered is not supported currently in hipMemoryType, due to HIP functionality backward compatibility.
## threadfence_system
Threadfence_system makes all device memory writes, all writes to mapped host memory, and all writes to peer memory visible to CPU and other GPU devices.
Some implementations can provide this behavior by flushing the GPU L2 cache.