[SPIR-V] early return with ROV will generate spirv that hung the gpu (or at least weird spirv)

Đang mở
#9,020 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp

Hướng nghiên cứu

Start by reproducing with the linked godbolt snippet and dumping the SPIR-V for the early-return path. Look at the block labelled %36, where an OpEndInvocationInterlockEXT and an OpBeginInvocationInterlockEXT appear just before OpBranch %30, and find where the compiler emits the interlock begin/end pairs for early returns. Done means the emitted SPIR-V no longer leaves an unmatched begin interlock before the branch, with a regression test for ROV plus early return.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug needs-triage spirv

Hi everyone ! Miss me ?

Description
While using ROVs and having early return, SpirV will generate extra OpEndInvocationInterlockEXT and OpBeginInvocationInterlockEXT that hung the GPU.

Steps to Reproduce
https://godbolt.org/z/YnYqdbjre

Actual Behavior
the early return will produce an extra

         %36 = OpLabel
               OpEndInvocationInterlockEXT
               OpBeginInvocationInterlockEXT
               OpBranch %30

It seems the last OpBeginInvocationInterlockEXT is not closed and the GPU will hung.

Environment
DXC trunk on godbolt
Reproduce also on windows 11 and custom fork of 1.10.2605.24.

Ngôn ngữ chính
C++
Star
3.7k
Fork
926
Merge trung bình
3 ngày 22 giờ
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/DirectXShaderCompiler

Tất cả issue của microsoft/DirectXShaderCompiler

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.