|
| 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 --> |
0 commit comments