-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL][LowerWGScope][SpecConstantsPass] fix new call's calling conv for spir/spirv #15718
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
[SYCL][LowerWGScope][SpecConstantsPass] fix new call's calling conv for spir/spirv #15718
Conversation
…ir target Newly created non-kernel function and function call should have spirv_func calling convention.
|
one motivation is intel gpu backend requires calling conv to be consistent. |
| FunctionCallee FC = | ||
| M.getOrInsertFunction(Name, Attr, RetTy, ScopeTy, ScopeTy, SemanticsTy); | ||
| assert(FC.getCallee() && "spirv intrinsic creation failed"); | ||
| if (TT.isSPIR()) |
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.
| if (TT.isSPIR()) | |
| if (TT.isSPIROrSPIRV()) |
same for other spot too i think
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.
done
Also fixed SpecConstantsPass
Thanks for adding this support. Looks good. One question. Is there documentation anywhere that talks about this calling convention and about which functions need this. Surely not a blocker. 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 as in my feedback is addressed, thx
@asudarsa For spir target, quote from page 33 of https://registry.khronos.org/SPIR/specs/spir_spec-2.0.pdf So I assume every function call should have either spir_kernel or spir_func calling convention. I am not ware of any documentation of the requirement of consistent calling convention in the intel gpu backend. |
|
@intel/llvm-gatekeepers please merge, thank you |
Newly created non-kernel function and function call should have spirv_func calling convention.