fix memory problem
Fix HIP code, include a example