From 1309c541cddedc2414544d23f8766deb3cd121b3 Mon Sep 17 00:00:00 2001 From: haykh Date: Sat, 27 Jul 2024 23:54:49 -0400 Subject: [PATCH] upd amd faq --- docs/getting-started/faq.md | 56 +++++++++++++++---------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/docs/getting-started/faq.md b/docs/getting-started/faq.md index 7351b29..840a101 100644 --- a/docs/getting-started/faq.md +++ b/docs/getting-started/faq.md @@ -29,7 +29,7 @@ hide: - `HSA_OVERRIDE_GFX_VERSION` set to GFX version that you used to compile the code (for most recent AMD cards that would be `11.0.0` (if you used `GFX1100` Kokkos flag); - `HIP_VISIBLE_DEVICES`, and `ROCR_VISIBLE_DEVICES` both need to be set to your device ID (usually, it's just a number from 0 to the number of devices that support HIP). - For example, the output of `rocminfo | grep -A 14 "Agent "` may look like this: + For example, the output of `rocminfo | grep -A 5 "Agent "` may look like this: ``` Agent 1 ******* @@ -37,49 +37,37 @@ hide: Uuid: CPU-XX Marketing Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics Vendor Name: CPU - Feature: None specified - Profile: FULL_PROFILE - Float Round Mode: NEAR - Max Queue Number: 0(0x0) - Queue Min Size: 0(0x0) - Queue Max Size: 0(0x0) - Queue Type: MULTI - Node: 0 - Device Type: CPU -- Agent 2 ******* - Name: gfx1102 + Name: gfx1100 Uuid: GPU-XX - Marketing Name: AMD Radeon RX 7700S + Marketing Name: AMD Radeon™ RX 7700S Vendor Name: AMD - Feature: KERNEL_DISPATCH - Profile: BASE_PROFILE - Float Round Mode: NEAR - Max Queue Number: 128(0x80) - Queue Min Size: 64(0x40) - Queue Max Size: 131072(0x20000) - Queue Type: MULTI - Node: 1 - Device Type: GPU -- Agent 3 ******* - Name: gfx1103 + Name: gfx1100 Uuid: GPU-XX - Marketing Name: AMD Radeon 780M - Vendor Name: AMD - Feature: KERNEL_DISPATCH - Profile: BASE_PROFILE - Float Round Mode: NEAR - Max Queue Number: 128(0x80) - Queue Min Size: 64(0x40) - Queue Max Size: 131072(0x20000) - Queue Type: MULTI - Node: 2 - Device Type: GPU + Marketing Name: AMD Radeon Graphics + Vendor Name: AMD + ``` + In this case, the required GPU is the `Agent 2`, which supports GFX1100. `rocm-smi` will look something like this: + ``` + ============================================ ROCm System Management Interface ============================================ + ====================================================== Concise Info ====================================================== + Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU% + (DID, GUID) (Edge) (Avg) (Mem, Compute, ID) + ========================================================================================================================== + 0 1 0x7480, 19047 35.0°C 0.0W N/A, N/A, 0 0Mhz 96Mhz 29.8% auto 100.0W 0% 0% + 1 2 0x15bf, 17218 48.0°C 19.111W N/A, N/A, 0 None 1000Mhz 0% auto Unsupported 82% 5% + ========================================================================================================================== + ================================================== End of ROCm SMI Log =================================================== + ``` + so the GPU we need has `Device` ID of `0` (since it's the dedicated GPU, it might automatically turn off when idle to save power on laptops; hence `Power = 0.0W`). Now we can run the code with: + ```sh + HSA_OVERRIDE_GFX_VERSION=11.0.0 HIP_VISIBLE_DEVICES=1 ROCR_VISIBLE_DEVICES=1 ./executable ... ``` - In this case, the required GPU is the `Agent 2`, which supports GFX1100, and has id of #1 (the `Node`). So we'll need to specify: `HSA_OVERRIDE_GFX_VERSION=11.0.0`, `HIP_VISIBLE_DEVICES=1`, `ROCR_VISIBLE_DEVICES=1`. ??? faq "Running in a `docker` container with an AMD card"