Commit b729d1b
Fix memory allocation bug to use the correct hipDevice (#308)
- Not using hipSetDevice before allocating memory can use unintended
deviceIdx when executing fabric-handle based transfers
- Reset numa_set_preferred(-1) before ERR_FATAL early return in the
non-POD_COMM_ENABLED path; without this the NUMA policy stays dirty
for subsequent CPU allocations in the same process
- Use memDevice.memIndex directly in the top-level hipSetDevice call
instead of deviceIdx, which is NUMA-remapped for CPU types only;
documents that the MEM_CPU_CLOSEST remapping does not apply to GPU
- Remove now-redundant hipSetDevice inside the POD_COMM GPU memHandle
branch; device was already set at the top of AllocateMemory
- Guard CollectTopology GPU agent probe loop with hipSetDevice(i) so
each AllocateMemory call targets the correct device
---------
Co-authored-by: Claude <claude@anthropic.com>1 parent 9b22b00 commit b729d1b
1 file changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1499 | 1508 | | |
1500 | 1509 | | |
1501 | 1510 | | |
| |||
1533 | 1542 | | |
1534 | 1543 | | |
1535 | 1544 | | |
| 1545 | + | |
1536 | 1546 | | |
1537 | | - | |
1538 | 1547 | | |
1539 | 1548 | | |
1540 | 1549 | | |
1541 | 1550 | | |
1542 | 1551 | | |
| 1552 | + | |
1543 | 1553 | | |
1544 | 1554 | | |
1545 | 1555 | | |
| |||
1548 | 1558 | | |
1549 | 1559 | | |
1550 | 1560 | | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | 1561 | | |
1555 | 1562 | | |
1556 | 1563 | | |
| |||
1591 | 1598 | | |
1592 | 1599 | | |
1593 | 1600 | | |
1594 | | - | |
1595 | | - | |
1596 | 1601 | | |
1597 | 1602 | | |
1598 | 1603 | | |
| |||
0 commit comments