-
Notifications
You must be signed in to change notification settings - Fork 769
[llvm-spirv] Cherry pick Khronos changes to expand collection of entry point interfaces (PR #1334) #10623
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
Conversation
Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
if (isKernel(F)) | ||
BM->addEntryPoint(ExecutionModelKernel, BF->getId()); | ||
else if (F->getLinkage() != GlobalValue::InternalLinkage) | ||
if (!isKernel(F) && F->getLinkage() != GlobalValue::InternalLinkage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer add entry point for function decls.
SPIRVWord ModuleVersion = static_cast<SPIRVWord>(BM->getSPIRVVersion()); | ||
if (AS != SPIRAS_Input && AS != SPIRAS_Output && | ||
ModuleVersion < static_cast<SPIRVWord>(VersionNumber::SPIRV_1_4)) | ||
BM->setMinSPIRVVersion(VersionNumber::SPIRV_1_4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now pass Version number directly without converting to SPIRVWord
@@ -248,6 +248,8 @@ class LLVMToSPIRVBase : protected BuiltinCallHelper { | |||
const Function *FS, | |||
const std::unordered_set<const Function *> Funcs) const; | |||
void collectInputOutputVariables(SPIRVFunction *SF, Function *F); | |||
std::vector<SPIRVId> collectEntryPointInterfaces(SPIRVFunction *BF, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function declaration was missing in the original patch.
Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
Just curious, why can't we get this patch with a regular pulldown? |
This was part of an earlier pulldown and was removed due to issues in CI testing. We are trying to reintroduce it. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm from a high level, i did not review the change in depth
Sorry. I pushed the wrong button which caused close/reopen. |
I think this is ready to land. Can you please help with merging when convenient? Thanks |
…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 <arvind.sudarsanam@intel.com>
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