-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPIR-V validation error: "Interface variable is used by entry point, but is not listed as an interface" #9958
Comments
I actually filed a bug already a few months ago on the "Built In variable" storage class: #6703 |
This is the llvm-spirv command I run on the bc file attached. This llvm-spirv is built using Khronos main branch SPIRV-LLVM-Translator.
I get the following OpEntryPoint in the generated spv code. Looks like all the interfaces are listed as we expect.
However, I see a new error now:
Will open a separate issue, may be. Thanks |
Can you please check when convenient? Thanks |
this isn't a bug inside |
Ah..of course..thanks for the redirect. Given that it's reported here, I should have tried llvm-spirv from intel/llvm branch. I will try that and see if I am able to reproduce the error. Thanks |
This issue is mainly due to differences between intel/llvm's llvm-spirv and khronos. We are tracking the effort to minimize this difference here: #7592 In this particular case, we are missing the following commit in intel/llvm: Reintroducing this commit resolves this issue. We will investigate further and provide a PR to intel/llvm soon. Thanks |
Though is 352ea14d320da10fcf72c19b46c50020e657c89a enough as the storage class of builtins needs to be I don't think |
…y point interfaces (PR #1334) (#10623) This PR pulls in the following PR from upstream Khronos SPIRV-LLVM-Translator repo: KhronosGroup/SPIRV-LLVM-Translator#1334 ` This is a patch to expand the collection of entry point interfaces. In SPIR-V 1.4 and later OpEntryPoint must list all global variables in the interface. ` In addition, a couple of minor changes have been added to sync with latest code. This patch addresses #9958 Updated the following tests to sync with upstream as well: llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_clobbers.cl llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_constraints.cl Thanks --------- Signed-off-by: Arvind Sudarsanam <[email protected]>
Hi @karolherbst Thanks again for reporting this. A fix has been merged for this. Can you please verify if this issue is resolved at your end? Sincerely |
I do see the error reported by spirv-val goes away with this patch. Thanks again |
spirv-val doesn't report any error if builtins aren't in the |
Anyway, this can be closed as we already have a bug for the invalid storage class: #6703 |
…y point interfaces (PR intel#1334) (intel#10623) This PR pulls in the following PR from upstream Khronos SPIRV-LLVM-Translator repo: KhronosGroup/SPIRV-LLVM-Translator#1334 ` This is a patch to expand the collection of entry point interfaces. In SPIR-V 1.4 and later OpEntryPoint must list all global variables in the interface. ` In addition, a couple of minor changes have been added to sync with latest code. This patch addresses intel#9958 Updated the following tests to sync with upstream as well: llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_clobbers.cl llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_constraints.cl Thanks --------- Signed-off-by: Arvind Sudarsanam <[email protected]>
Multiple SyCL CTS tests are triggering the "Interface variable is used by entry point, but is not listed as an interface" spir-v validation error, e.g.
test_atomic_fence
From the SPIR-V specification on OpEntryPoint:
"Interface is a list of of global OpVariable instructions. These declare the set of global variables from a module that form the interface of this entry point. The set of Interface must be equal to or a superset of the global OpVariable Result referenced by the entry point’s static call tree, within the interface’s storage classes. Before version 1.4, the interface’s storage classes are limited to the Input and Output storage classes. Starting with version 1.4, the interface’s storage classes are all storage classes used in declaring all global variables referenced by the entry point’s call tree."
Side Note: the storage class of builtins also have to be in the
Input
storage class according to the OpenCL SPIR-V Env specification in 2.9: "An OpVariable in a SPIR-V module with the BuiltIn decoration represents a built-in variable. All built-in variables must be in the Input storage class."Side Note2: I'm confused this even comes up, as this issue was fixed years ago in the SPIRV-LLVM-Translator:
The text was updated successfully, but these errors were encountered: