-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Ideally we would need to resolve as many intrinsics as possible either by lowering them to their SPIR-V counter-parts or by expansion. Practically, we should focus on math intrinsics that have counterparts in OpenCL extended instruction sets.
Goal of this very issue: gather info for missing intrinsic support and scatter it to:
a. folks who wants to ramp up in (SPIR-V) backend as usually adding an intrinsic lowering is great for this;
b. folks who got a bit bored and want to get something done.
When adding, ideally, we should target both compute and shader SPIR-V, though it's not mandatory.
Useful links:
OpenCL ExtInstSet: https://registry.khronos.org/SPIR-V/specs/unified1/OpenCL.ExtendedInstructionSet.100.html
GLSL ExtInstSet: https://registry.khronos.org/SPIR-V/specs/unified1/GLSL.std.450.html
Known missing intrinsics (don't hesitate to add new items and take ownership overthem):
basic math:
- llvm.sincos PR: [SPIR-V] Add lowering for G_FSINCOS llvm/llvm-project#179053
- llvm.exp10 note: a. HLSL doesn't have exp10, so likely just error out when you face it in this env; b. per OpenCL exp10 builtin is only for float gentype, for half gentype we should use half_exp10.
- llvm.ldexp
... and many more...