Skip to content

[DO NOT MERGE] H100 hang: candidate fix C4, pageable memory residency (workstream B4) - #2812

Closed
bdice wants to merge 3 commits into
NVIDIA:mainfrom
bdice:b4-hmm-pageable-copy-ci
Closed

bdice wants to merge 3 commits into
NVIDIA:mainfrom
bdice:b4-hmm-pageable-copy-ci

Conversation

@bdice

@bdice bdice commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Workstream B4 (#2783, #2772). Candidate fix C4: check_pointer_residency (and its siblings in PQ train_from_rows and expect_device_accessible_data_handle) now classify memory by cudaPointerAttributes::type. Pageable (unregistered) host memory is never treated as device memory, even when devicePointer is non-null on HMM/ATS systems. Without this, utils::memzero issued a cudaMemsetAsync on the accum_sorted_sizes host_vector at the start of ivf_pq::build, which matches the stuck memset seen with CUDA_LAUNCH_BLOCKING=1. This follows the residency theory on B's earlier bdice:fix-hmm-pageable-residency branch. The CI-only commits build libcuvs with the default arch list, run a pointer-attribute probe on touched and untouched malloc buffers, and loop the PQ+CAGRA reproducer on 4x H100 12.9.2, followed by the full suite. The no-fix control is #2817. Do not merge.

@copy-pr-bot

copy-pr-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@bdice

bdice commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9cca628

bdice added 3 commits October 10, 2026 22:44
check_pointer_residency counted a pointer as device-accessible when
cudaPointerGetAttributes() returned a non-null devicePointer. On systems
where the GPU can access pageable memory (HMM, ATS), devicePointer can be
non-null for ordinary pageable host memory, so host buffers were classified
as host_and_device. utils::memzero then issued cudaMemsetAsync on host
memory (for example the accum_sorted_sizes host_vector at the start of
ivf_pq::build), and the PQ/VPQ encoders could launch kernels directly on
pageable host data. These GPU accesses to pageable memory go through GPU
page faults.

Classify memory by cudaPointerAttributes::type: pageable
(cudaMemoryTypeUnregistered) memory is host-only, while device, managed and
registered host memory keep their previous classification. Apply the same
rule in the PQ train_from_rows dispatch and in
expect_device_accessible_data_handle.
@bdice
bdice force-pushed the b4-hmm-pageable-copy-ci branch from 9cca628 to 3b690d1 Compare October 11, 2026 00:38
@bdice bdice changed the title [DO NOT MERGE] H100 hang: candidate fixes for pageable host copies (workstream B4) [DO NOT MERGE] H100 hang: candidate fix C4, pageable memory residency (workstream B4) Oct 11, 2026
@bdice

bdice commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3b690d1

@bdice

bdice commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

Closing: this was a diagnostic PR for the H100 hang (workstream B of #2783). The root cause (pageable host memory treated as device memory on HMM systems) is fixed in #2829.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant