Skip to content

[SYCL] Rename __clc_native_exp2/tanh to __spirv_ocl_native_* in SYCL headers#21472

Open
wenju-he wants to merge 3 commits intointel:syclfrom
wenju-he:__clc_native_exp2-tanh-sycl-header
Open

[SYCL] Rename __clc_native_exp2/tanh to __spirv_ocl_native_* in SYCL headers#21472
wenju-he wants to merge 3 commits intointel:syclfrom
wenju-he:__clc_native_exp2-tanh-sycl-header

Conversation

@wenju-he
Copy link
Contributor

@wenju-he wenju-he commented Mar 9, 2026

Why:

  • _clc* names are libclc-internal conventions and are confusing in SYCL headers.
  • After this change, clc-remangler don't need to handle _clc* symbols.

Note: __spirv_ocl_native_tanh is not yet listed in the OpenCL Extended Instruction Set spec.

…headers

Why:
- __clc_* names are libclc-internal conventions and are confusing in SYCL headers.
- After this change, clc-remangler don't need to handle __clc_* symbols.

Note: __spirv_ocl_native_tanh is not yet listed in the OpenCL Extended
Instruction Set spec.
@wenju-he wenju-he requested review from a team as code owners March 9, 2026 23:58
@bader
Copy link
Contributor

bader commented Mar 10, 2026

Note: __spirv_ocl_native_tanh is not yet listed in the OpenCL Extended Instruction Set spec.

@wenju-he, how is __spirv_ocl_native_tanh translated into SPIR-V: as a function call or as an undocumented SPIR-V instruction?

@vmaksimo, @YuriPlyakhin, @bashbaug, FYI. Do we need to document this function in a SPIR-V extension?

@wenju-he
Copy link
Contributor Author

wenju-he commented Mar 10, 2026

how is __spirv_ocl_native_tanh translated into SPIR-V: as a function call or as an undocumented SPIR-V instruction?

It is a function call in SPIR-V if we enable it for SPIR-V path:

     %call_i = OpFunctionCall %float %_Z23__spirv_ocl_native_tanhf %35

However, current use of __spirv_ocl_native_tanh in SYCL header is restricted to __NVPTX__ path. So SPIR-V path won't see it. But people can still use it for SPIR-V since it is in public header.

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