Relaxed Allocation Limit in Level Zero
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện hành vi cấp phát bằng mẫu levelZeroAlloc.cpp được liên kết, sử dụng zeMemAllocDevice và cờ ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE. So sánh totalSize của DEVICE_MEMORY_PROPERTIES được báo cáo và kết quả 0x78000009 với sự cố crash khi dùng nhiều buffer. Được xem là hoàn tất khi hành vi dự kiến và mọi hướng dẫn hoặc thay đổi API cần thiết đã được ghi lại và được kiểm thử bằng một test phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When playing around with the ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE flag for buffer allocation I noticed the following:
If I request a buffer to be allocated with a size larger than my system allows (in my case 26GB), I get an error with 0x78000009 (size argument is not supported by the device ). Which is expected.
For context, this is the output of the device memory properties of my system:
stype : DEVICE_MEMORY_PROPERTIES
pNext : 0x0
flags : Device::{ ? }
maxClockRate : 0 <-- Not sure why this value is 0
maxBusWidth : 64
totalSize : 26706980864 <<- ~ 26GB
name : DDR
However, I am able to execute the allocate functions (e.g., zeMemAllocDevice) with for example, 3 buffers of 20 GB each (in total is using 60GB in global memory, which I should not be allowed to do this), So, each alloc call is requesting a buffer size smaller than the maximum global memory available but combined, it is much larger. But instead of getting an error code, I get directly a crash.
You can reproduce this using this sample code: https://github.com/jjfumero/codeBlogArticles/blob/master/april2022/levelZeroAlloc/levelZeroAlloc.cpp
Is this behaviour expected? Or have you considered/ is there anything in the Level Zero API similar to this call?
bool canBeAllocated = zeCanDeviceBufferSizeBeAllocated(context, deviceDesc, alignment, device, &buffer);
So a function that we can query for available space for a given buffer before the actual allocation.
Hardware/ Software details:
- Intel Driver: 21.38.21026
- Total RAM: 32 GB
- OpenCL 3.0
- GPU: Intel HD Graphics from i9-10885H
- Ngôn ngữ chính
- C++
- Star
- 335
- Fork
- 140
- Merge trung bình
- 12 giờ 32 phút
- Pull request đã merge (30 ngày)
- 5
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 oneapi-src/level-zero
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
oneapi-src/level-zero#495 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
oneapi-src/level-zero#485 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
oneapi-src/level-zero#447 · 2 bình luận ·
-
Need DMA/RDMA support Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
oneapi-src/level-zero#482 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
oneapi-src/level-zero#419 ·
Tất cả issue của oneapi-src/level-zero
Issue tương tự
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
QuantStack/git2cpp#187 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/winget-cli#6547 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
AXERA-TECH/ax-llm#77 ·