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

Change-Id: I1175c12a55c7cd306a5aed3f1a400ae7525f4cb5
Tá an tiomantas seo le fáil i:
Julia Jiang údaraithe agus Julia Jiang tiomanta 2023-09-06 11:49:15 -04:00
1 tuismitheoir d8ce5a0271
tiomantas fffa5eab08
2 comhad athraithe
+16 -5

Níor tháinig aon chomhaid le do chuardach

+3 -2
Féach ar an gComhad
@@ -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.