llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL][LowerWGScope][SpecConstantsPass] fix new call's calling conv for spir/spirv

Open wenju-he opened this issue 1 year ago • 3 comments

Newly created non-kernel function and function call should have spirv_func calling convention.

wenju-he avatar Oct 16 '24 08:10 wenju-he

one motivation is intel gpu backend requires calling conv to be consistent.

wenju-he avatar Oct 16 '24 08:10 wenju-he

one motivation is intel gpu backend requires calling conv to be consistent.

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

asudarsa avatar Oct 17 '24 03:10 asudarsa

one motivation is intel gpu backend requires calling conv to be consistent.

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

@asudarsa For spir target, quote from page 33 of https://registry.khronos.org/SPIR/specs/spir_spec-2.0.pdf

3.8 Calling Conventions
SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func"
calling convention. All other calling conventions are disallowed.

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.

wenju-he avatar Oct 18 '24 09:10 wenju-he

@intel/llvm-gatekeepers please merge, thank you

wenju-he avatar Oct 21 '24 07:10 wenju-he