[REQUEST] XPU: register native pinned host memory with the device runtime (follow-up to #8283)
Maintainers usually reply within 3 days
Assessment
This issue has not been assessed yet.
Description
Is your feature request related to a problem? Please describe.
#8283 taught the native pinned-memory allocator (DS_PIN_MEMORY_BACKEND=native, posix_memalign + mlock) to register host memory with the device runtime so that copy_(..., non_blocking=True) can go through the DMA engine. On CUDA this closed a large bandwidth gap (H200: ~10-17 GB/s with mlock only vs. ~53-55 GB/s after cudaHostRegister).
Registration goes through the new register_host_memory / unregister_host_memory accelerator hooks, but only CUDA_Accelerator overrides them. XPU_Accelerator inherits the base-class no-op, so on Intel GPUs native pinned buffers stay mlock-only and H2D/D2H transfers run at pageable bandwidth even with DS_PIN_MEMORY_REGISTER_DEVICE=1. The degradation is silent: registration just returns False and nothing logs.
Describe the solution you'd like
- Implement
register_host_memory/unregister_host_memoryinaccelerator/xpu_accelerator.py, e.g. via Level ZerozeMemRegisterHostMemory/zeMemUnregisterMemoryon the allocation range, honoring the sameDS_PIN_MEMORY_REGISTER_DEVICEopt-out and the graceful "log once and continue with mlock" fallback on failure. - Extend
tests/unit/v1/pin_memory/test_pin_memory.pywith an XPU equivalent of the CUDA cudart-mock test. - Optionally extend
benchmarks/pin_memory/h2d_d2h_bench.pyso the before/after H2D/D2H bandwidth can be quantified on XPU.
Describe alternatives you've considered
- Keep mlock-only on XPU (status quo): functionally correct, but leaves H2D/D2H at pageable speeds for native-pin users on Intel GPUs.
Additional context
- Hooks added in #8283: no-op defaults in
accelerator/abstract_accelerator.py, CUDA implementation inaccelerator/cuda_accelerator.py(torch.cuda.cudart().cudaHostRegister/cudaHostUnregister). - Call sites:
NativePinnedMemory.pin/_releaseindeepspeed/utils/pin_memory.py.
- Dominant language
- Python
- Stars
- 43.3k
- Forks
- 5.1k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepspeedai/DeepSpeed
-
[BUG] Universal checkpoint resume puts CPU `step` into fused/capturable optimizer statePossibly taken @ArjunPakhan claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
deepspeedai/DeepSpeed#8884 · 1 comment ·
Maintainers usually reply within 3 days
-
init_inference rejects dtype=torch.int8 on every acceleratorMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8577 ·
Maintainers usually reply within 3 days
-
[BUG] AutoTP checkpoint load raises AttributeError on a model containing nn.InstanceNorm1dPossibly taken @vineethsaivs claimed this 41 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
deepspeedai/DeepSpeed#8514 ·
Maintainers usually reply within 3 days
-
[BUG] Python checkpoint writers fail to reload full ZeRO-3 state with default torch.loadPossibly taken @ai-yang claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8500 ·
Maintainers usually reply within 3 days
-
[BUG] set_norm_for_param_grad_in_gpu's grad_accum fallback is dead in both accumulation modesPossibly taken @LOGO127 claimed this 52 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
deepspeedai/DeepSpeed#8371 ·
Maintainers usually reply within 3 days
All issues in deepspeedai/DeepSpeed
Similar issues
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freePossibly taken @Aaqibhafeezkhan claimed this today. Openbeginner documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BistaDinesh03/critique#164 · 1 comment ·
Maintainers usually reply within 1 day
-
bug IO
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MrNeRF/LichtFeld-Studio#3824 ·
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-webui/open-webui#33200 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog checkPossibly taken @ocelotl claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
open-telemetry/opentelemetry-python#5825 ·
Maintainers usually reply within 2 days