Repository navigation
Conversation
--use_cuda_dmabuf checked the memory type while the options were still being parsed, so it failed with "CUDA DMA-BUF cannot be used without CUDA" whenever it came before --use_cuda or --use_cuda_bus_id. The MUSA, ROCm, Neuron and MLU DMA-BUF options had the same check. Record the DMA-BUF options while parsing and check them against the final memory type after the loop, next to the other DMA-BUF dependency checks. The error messages are unchanged. Fixes: linux-rdma#336 Assisted-by: Claude:claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Dezhen Lu <dezhen.lu@student.uni-tuebingen.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--use_cuda_dmabufchecked the memory type while the options were still being parsed, so it failed with "CUDA DMA-BUF cannot be used without CUDA" whenever it came before--use_cudaor--use_cuda_bus_id. The MUSA, ROCm, Neuron and MLU DMA-BUF options had the same check. This moves the five checks after the parsing loop, next to the existing data-direct and PCIe-mapping checks. The error messages are unchanged.Fixes #336
Tested on GH200 (aarch64) with ConnectX-7, CUDA 13.2, built with
HAVE_CUDA_DMABUF, no new build warnings. With an unknown-dto stop right after the parser:--use_cuda_dmabuf --use_cuda=0--use_cuda_dmabuf --use_cuda_bus_id=<addr>--use_cuda_dmabuf --use_cuda=0 --use_cuda_pcie_mapping--use_cuda=0 --use_cuda_dmabuf--use_cuda_dmabufaloneib_write_bwloopback on one port, 1 MiB, 2000 iterations, GPU memory through DMA-BUF: 382.48 Gb/s with--use_cuda_dmabuf --use_cuda=0and 382.40 Gb/s with the options the other way round. The MUSA, ROCm, Neuron and MLU paths were not run.--cuda_mem_type,--opencl_platform_id,--gpu_touchand--use_opencl(which needs--odpfirst) still depend on option order. They are left out of this change.I used Claude, an AI coding assistant, for this change; the commit carries an Assisted-by tag.