Relaxed Allocation Limit in Level Zero
还没有人认领这个 Issue。
评估
调研方向
使用链接的 levelZeroAlloc.cpp 示例,通过 zeMemAllocDevice 和 ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE 标志复现分配行为。将报告的 DEVICE_MEMORY_PROPERTIES totalSize 和 0x78000009 结果与多缓冲区崩溃进行比较。预期行为以及任何所需的 API 指导或更改都已记录,并由适当的测试覆盖后,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- C++
- 星标
- 335
- 派生
- 140
- 平均合并
- 12 小时 32 分钟
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oneapi-src/level-zero 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
oneapi-src/level-zero#495 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
oneapi-src/level-zero#485 ·
-
难度 1/5 1 小时以内 新手友好度 76/100
oneapi-src/level-zero#447 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 30/100
oneapi-src/level-zero#482 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
oneapi-src/level-zero#419 ·
查看 oneapi-src/level-zero 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
AXERA-TECH/ax-llm#77 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
games-on-whales/wolf#509 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 74/100
-
bug-unconfirmed
难度 2/5 1-3 小时 新手友好度 76/100