Forum

Top 20 API Calls fr…
 
Notifications
Clear all

Top 20 API Calls from AMD ROCm

1 Posts
1 Users
0 Reactions
11 Views
 josh
(@josh)
Member Admin
Joined: 2 months ago
Posts: 510
Topic starter  

Here are the **top 20 essential API calls** commonly used in AMD ROCm (Radeon Open Compute) programming, especially focusing on HIP (Heterogeneous-Compute Interface for Portability), which is AMD’s CUDA-like API:

1. **hipInit** — Initialize the HIP runtime. (Optional, often implicit)
2. **hipDeviceGetCount** — Get the number of available GPU devices.
3. **hipDeviceGet** — Obtain a handle to a specific device.
4. **hipSetDevice** — Set the current device for subsequent operations.
5. **hipMalloc** — Allocate device (GPU) memory.
6. **hipFree** — Free device memory.
7. **hipMemcpy** — Copy data between host and device.
8. **hipMemcpyAsync** — Asynchronous host-to-device or device-to-host copy.
9. **hipStreamCreate** — Create a stream for asynchronous execution.
10. **hipStreamDestroy** — Destroy a created stream.
11. **hipStreamSynchronize** — Wait until all tasks in a stream are complete.
12. **hipEventCreate** — Create an event for synchronization.
13. **hipEventRecord** — Record an event in a stream.
14. **hipEventSynchronize** — Wait for an event to complete.
15. **hipModuleLoad** — Load a HIP or PTX module containing kernels.
16. **hipModuleGetFunction** — Retrieve a kernel function from a module.
17. **hipModuleLaunchKernel** — Launch a kernel on the GPU.
18. **hipDeviceGetAttribute** — Get device attributes (compute capability, total memory, etc.).
19. **hipDeviceGetProperties** — Get properties of a device.
20. **hipDeviceReset** — Reset the device, cleaning up resources.


   
Quote
Share: