cuda.core: VirtualMemoryResource.deallocate() unmaps without ordering on the stream
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend-api-design, performance
Hướng nghiên cứu
Bắt đầu tại VirtualMemoryResource.deallocate() và so sánh cách xử lý việc xác thực stream và cuMemUnmap của nó với _SynchronousMemoryResource và LegacyPinnedMemoryResource. Xác nhận tài liệu về thứ tự stream của Buffer.close(), sau đó kiểm tra rằng việc giải phóng đồng bộ hóa stream trước khi unmapping và rằng hành vi tăng kích thước trong slow path vẫn chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
VirtualMemoryResource.deallocate() validates its stream argument and then calls cuMemUnmap at once. The VMM unmap does not synchronize, so work still in flight on the buffer accesses an unmapped range.
Buffer.close() documents stream-ordered deallocation, and the two synchronous resources (_SynchronousMemoryResource, LegacyPinnedMemoryResource) call stream.sync() before they free. VirtualMemoryResource is the only synchronous resource that skips this.
Suggested fix
Sync the stream before cuMemUnmap, as the siblings do. After #2880 the slow-path grow closes the old buffer through deallocate(), so a grow will sync once; that is the correct cost for a synchronous resource.
Refs: found while analyzing #2882.
- Ngôn ngữ chính
- Cython
- Star
- 3.4k
- Fork
- 329
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 113
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuda-python
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NVIDIA/cuda-python#2717 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
NVIDIA/cuda-python#2712 ·
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookup Đang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
-
cuda.core triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NVIDIA/cuda-python#2435 · 1 bình luận ·
-
CI/CD
NVIDIA/cuda-python#2926 · 1 người được giao ·
Tất cả issue của NVIDIA/cuda-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
good first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
area/sessions comp/agent P2 tool/skills type/perf
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NousResearch/hermes-agent#117788 ·