SWDEV-406233 - Add notes on hipMemoryType and PointerGetAttributes API for unsupported cuda enum
Change-Id: I1175c12a55c7cd306a5aed3f1a400ae7525f4cb5
This commit is contained in:
zatwierdzone przez
Julia Jiang
rodzic
d8ce5a0271
commit
fffa5eab08
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user