Commit 89773b8
drm/amdkfd: Let VRAM allocations go to GTT domain on small APUs
Small APUs(i.e., consumer, embedded products) usually have a small
carveout device memory which can't satisfy most compute workloads
memory allocation requirements.
We can't even run a Basic MNIST Example with a default 512MB carveout.
https://github.com/pytorch/examples/tree/main/mnist. Error Log:
"torch.cuda.OutOfMemoryError: HIP out of memory. Tried to allocate
84.00 MiB. GPU 0 has a total capacity of 512.00 MiB of which 0 bytes
is free. Of the allocated memory 103.83 MiB is allocated by PyTorch,
and 22.17 MiB is reserved by PyTorch but unallocated"
Though we can change BIOS settings to enlarge carveout size,
which is inflexible and may bring complaint. On the other hand,
the memory resource can't be effectively used between host and device.
The solution is MI300A approach, i.e., let VRAM allocations go to GTT.
Then device and host can flexibly and effectively share memory resource.
v2: Report local_mem_size_private as 0. (Felix)
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent 3b3c9e8 commit 89773b8
File tree
5 files changed
+23
-13
lines changed- drivers/gpu/drm/amd
- amdgpu
- amdkfd
5 files changed
+23
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
824 | 827 | | |
825 | 828 | | |
826 | 829 | | |
| 830 | + | |
| 831 | + | |
827 | 832 | | |
828 | 833 | | |
829 | 834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
889 | 890 | | |
890 | 891 | | |
891 | 892 | | |
892 | | - | |
| 893 | + | |
893 | 894 | | |
894 | 895 | | |
895 | 896 | | |
| |||
1674 | 1675 | | |
1675 | 1676 | | |
1676 | 1677 | | |
1677 | | - | |
| 1678 | + | |
1678 | 1679 | | |
1679 | 1680 | | |
1680 | 1681 | | |
| |||
1722 | 1723 | | |
1723 | 1724 | | |
1724 | 1725 | | |
1725 | | - | |
| 1726 | + | |
1726 | 1727 | | |
1727 | 1728 | | |
1728 | 1729 | | |
| |||
1973 | 1974 | | |
1974 | 1975 | | |
1975 | 1976 | | |
1976 | | - | |
| 1977 | + | |
1977 | 1978 | | |
1978 | 1979 | | |
1979 | 1980 | | |
| |||
2395 | 2396 | | |
2396 | 2397 | | |
2397 | 2398 | | |
2398 | | - | |
2399 | | - | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
2400 | 2402 | | |
2401 | 2403 | | |
2402 | 2404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | | - | |
| 1026 | + | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2631 | 2631 | | |
2632 | 2632 | | |
2633 | 2633 | | |
2634 | | - | |
| 2634 | + | |
| 2635 | + | |
2635 | 2636 | | |
2636 | 2637 | | |
2637 | 2638 | | |
| |||
3349 | 3350 | | |
3350 | 3351 | | |
3351 | 3352 | | |
3352 | | - | |
| 3353 | + | |
| 3354 | + | |
3353 | 3355 | | |
3354 | 3356 | | |
3355 | 3357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
0 commit comments