Skip to content

Commit 30a4e67

Browse files
Merge pull request #54 from amd/memory-config
Add memory config dependency
2 parents 87e85ed + d20c060 commit 30a4e67

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
### STX Halo Memory Configurations
2+
3+
<!-- @os:windows -->
4+
5+
On Windows, to run larger models that require higher memory, we need to use the AMD Variable Graphics Memory (iGPU VRAM) allocation.
6+
7+
> 64 GB is adequate for most workloads but if you want to run the largest models with high context, you will need to set it to 96 GB.
8+
9+
This can be done by opening AMD Software: Adrenalin™ Edition control panel and navigating to: Performance > Tuning > AMD Variable Graphics Memory. Please reboot the system for the changes to take effect.
10+
11+
<!-- @os:end -->
12+
13+
<!-- @os:linux -->
14+
15+
On Linux, ROCm utilizes a shared system memory pool, and this pool is configured by default to half the system memory.
16+
17+
This amount can be increased by changing the kernel’s Translation Table Manager (TTM) page setting, with the following instructions.
18+
19+
1. If possible, AMD recommends setting the minimum dedicated VRAM in the BIOS (0.5GB)
20+
21+
2. Install the pipx utility and add the path for pipx installed wheels into the system search path.
22+
23+
```bash
24+
sudo apt install pipx
25+
pipx ensurepath
26+
```
27+
28+
3. Install the amd-debug-tools wheel from PyPi.
29+
```bash
30+
pipx install amd-debug-tools
31+
```
32+
33+
4. Run the amd-ttm tool to query the current settings for shared memory.
34+
```bash
35+
amd-ttm
36+
```
37+
38+
5.
39+
Reconfigure shared memory settings by using the --set argument (units in GB).
40+
```bash
41+
amd-ttm --set <NUM>
42+
```
43+
44+
6. Reboot the system for changes to take effect.
45+
46+
47+
#### amd-ttm Usage Examples
48+
49+
##### Query effective memory settings in the current kernel
50+
```bash
51+
amd-ttm
52+
💻 Current TTM pages limit: 16469033 pages (62.82 GB)
53+
💻 Total system memory: 125.65 GB
54+
```
55+
56+
##### Set usable shared memory
57+
```bash
58+
❯ amd-ttm --set 100
59+
🐧 Successfully set TTM pages limit to 26214400 pages (100.00 GB)
60+
🐧 Configuration written to /etc/modprobe.d/ttm.conf
61+
○ NOTE: You need to reboot for changes to take effect.
62+
Would you like to reboot the system now? (y/n): y
63+
```
64+
65+
##### Clear TTM setting and revert to kernel defaults
66+
```bash
67+
❯ amd-ttm --clear
68+
🐧 Configuration /etc/modprobe.d/ttm.conf removed
69+
Would you like to reboot the system now? (y/n): y
70+
```
71+
72+
<!-- @os:end -->

playbooks/dependencies/registry.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
"category": "driver",
5858
"platforms": ["windows", "linux"],
5959
"file": "driver.md"
60+
},
61+
"memory_config": {
62+
"name": "AMD Memory Configuration",
63+
"description": "Suggested memory configurations for Strix Halo Systems",
64+
"category": "framework",
65+
"platforms": ["windows", "linux"],
66+
"file": "memoryconfig.md"
6067
}
6168
}
6269
}

0 commit comments

Comments
 (0)