Skip to content

Commit

Permalink
upd amd faq
Browse files Browse the repository at this point in the history
  • Loading branch information
haykh committed Jul 28, 2024
1 parent e0bb2f1 commit 1309c54
Showing 1 changed file with 22 additions and 34 deletions.
56 changes: 22 additions & 34 deletions docs/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,57 +29,45 @@ 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
*******
Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
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"
Expand Down

0 comments on commit 1309c54

Please sign in to comment.