Skip to content

Conversation

@lbushi25
Copy link
Contributor

Cherry-pick of KhronosGroup/SPIRV-LLVM-Translator#2743.

The LLVM-IR type of zero-length array does not seem to have a mapping into SPIR-V type, rather it outputs an error since the obvious choice of zero-length array is not valid in SPIR-V. This, for example, prohibits us from using unbounded arrays in SYCL device kernels because they are typically represented in LLVM-IR through zero-length arrays. This PR introduces a workaround to this by lowering a zero-length array in LLVM-IR to a 1-length array in SPIR-V.

@lbushi25 lbushi25 requested a review from a team as a code owner October 10, 2024 19:25
@AlexeySachkov AlexeySachkov merged commit 7997c3c into intel:sycl Oct 11, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants