From dd84bb0d849ce7e1940abd04c30d67f8c4502d75 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Thu, 1 Sep 2016 11:35:42 +0530 Subject: [PATCH] Added context related difference note in hip_porting_driver_api.md Change-Id: I5bd2884a16db51871baa7c19fa2bd63a0bd3adad --- docs/markdown/hip_porting_driver_api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/markdown/hip_porting_driver_api.md b/docs/markdown/hip_porting_driver_api.md index 758b0672c1..b0ac3ecf1d 100644 --- a/docs/markdown/hip_porting_driver_api.md +++ b/docs/markdown/hip_porting_driver_api.md @@ -119,7 +119,8 @@ the device. `hipModuleLaunchKernel` is `cuLaunchKernel` in HIP world. It takes the same arguments as `cuLaunchKernel`. The argument `kernelParams` is not fully implemented for HCC. The workaround for it is, to use platform specific macros for each target. Or, `extra` argument can be used which works on both the platforms. #### Additional Information -HCC allocates staging buffers (used for unpinned copies) on a per-device basis. +- HCC allocates staging buffers (used for unpinned copies) on a per-device basis. +- HCC creates a primary context when the HIP API is called. So in a pure driver API code, HIP/HCC will create a primary context while HIP/NVCC will have empty context stack. HIP/HCC will push primary context to context stack when it is empty. This can have subtle differences on applications which mix the runtime and driver APIs. ### NVCC Implementation Notes