[BUG][intel:xe2] Dynamic shared memory (external_memory[.SHARED] + shared_mem_bytes) is Unimplemented
Maintainer thường phản hồi trong vòng 2 ngày
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
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- compilers
Hướng nghiên cứu
Start with the stock test max/kernels/test/gpu/device_context/test_external_shared_mem.mojo, which reproduces the failure with shared_mem_bytes=16*1024 on intel:xe2. Trace how enqueue_function passes dynamic shared_mem_bytes down to the Intel launch path, where HALError code -20 (Unimplemented) is raised. Done means the test passes on xe2 and dynamic shared memory returns the same values as on other targets.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Dynamic shared memory (the "size-at-launch" path) is Unimplemented on the Intel Arc Pro B60 (Xe2) target. external_memory[.SHARED] + enqueue_function[..., shared_mem_bytes=N] fails at runtime with HALError(code=-20): failed to execute function: Unimplemented. This reproduces with the stock, verbatim test_external_shared_mem test, so it is not specific to user code. Static shared memory (unsafe_stack_allocation[.SHARED]) works.
Environment
- Target:
intel:xe2(Arc Pro B60, 16-lane warp) - IGC
2.41.15, compute-runtime1.17.39758 - Built via Bazel with
--target-accelerator=intel:xe2 - Single device pinned via
ZE_AFFINITY_MASK=1
Minimal repro
This is the verbatim stock test max/kernels/test/gpu/device_context/test_external_shared_mem.mojo:
from max.gpu import thread_idx
from max.gpu.memory import external_memory
from max.gpu.sync import barrier
def dynamic_smem_kernel(data: MutPointer[Float32, MutAnyOrigin]):
var dynamic_sram = external_memory[
Float32, address_space=.SHARED, alignment=4
]()
dynamic_sram[thread_idx.x] = Float32(thread_idx.x)
barrier()
data[thread_idx.x] = dynamic_sram[thread_idx.x]
# host side:
ctx.enqueue_function[kernel](res_device, grid_dim=1, block_dim=16,
shared_mem_bytes=16 * 1024) # <- fails here
Observed (deterministic)
HALError(code=-20): failed to execute function: Unimplemented
The failure occurs at launch/execute of any kernel that uses external_memory[.SHARED] with a non-zero shared_mem_bytes.
Workaround
Fixed-size static shared memory works:
var smem = unsafe_stack_allocation[16, Float32, address_space=.SHARED]() # OK
(the size must be a comptime constant, so the staging buffer size cannot be chosen at launch.)
Expected
external_memory[.SHARED] + shared_mem_bytes should allocate dynamic shared memory and run, matching the behavior on other targets and the stock test's intent.
- Ngôn ngữ chính
- Mojo
- Star
- 30.2k
- Fork
- 3.2k
- Merge trung bình
- 6 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 modular/modular
-
bug_feature_triaged Team: Mojo Libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG]Incomplete Apache LicenseĐang mởbug bug_feature_triaged documentation mojo
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
`Counter.lt()` and `Counter.gt()` disagree with `__eq__`, and `a.lt(a)` can be `True`Có thể đã có người làm @YidaWeng đã nhận 1 ngày trước. Đang mởbug_feature_triaged Team: Mojo Libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
modular/modular#7696 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] `Counter` `-=`, `+=` and `&=` leave keys behind when they remove many keysCó thể đã có người làm @Tharun-Kumar-McW đã nhận 5 ngày trước. Đang mởbug bug_feature_triaged mojo-stdlib Team: Mojo Libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modular/modular#7658 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] exp(NaN) returns infĐang mởbug bug_feature_triaged mojo Team: Mojo Libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
modular/modular#7646 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của modular/modular
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midspiral/LemmaScript#355 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
grame-cncm/faust#1409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LiteralFloatValue: derived PartialEq with manual Hash on f64 breaks the Eq/Hash contract for -0.0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
gleam-lang/gleam#6524 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BigQuery -> Snowflake: UNNEST WITH OFFSET column becomes x['off'] when the UNNEST is the only sourceĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày