cuda.core: a second grow of a grown VMM buffer fails

Open
#2,908 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
backend

Research direction

Start with the cuda.core VMM buffer grow slow path described in the issue, focusing on buf.handle, aligned_prev_size, and the cuMemMap call. Review ownership redesign epic #2906 and the behavior in #2880; done means a second grow no longer fails from the handle-size mismatch and a failed grow leaves the old buffer intact.

Written by the indexing model from the issue text.

Description

bug cuda.core

After one grow a buffer is backed by two physical chunks. The slow path retains only the handle of the mapping at buf.handle and maps aligned_prev_size bytes from it, but cuMemMap requires the size to equal the handle's full size, so the second grow fails. On main the attempt also unmaps the old range first and cannot restore it; with #2880 the old buffer stays intact and the grow raises cleanly. Fix belongs to the ownership redesign (epic #2906).

Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 21h
Merged PRs (30d)
113

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/cuda-python

All issues in NVIDIA/cuda-python

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.