-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Implement the dot2add
HLSL Function
#99221
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
Comments
Will start working on this. |
@llvm/issue-subscribers-clang-codegen Author: Farzon Lotfi (farzonl)
- [ ] Implement `dot2add` clang builtin,
- [ ] Link `dot2add` clang builtin with `hlsl_intrinsics.h`
- [ ] Add sema checks for `dot2add` to `CheckHLSLBuiltinFunctionCall` in `SemaChecking.cpp`
- [ ] Add codegen for `dot2add` to `EmitHLSLBuiltinExpr` in `CGBuiltin.cpp`
- [ ] Add codegen tests to `clang/test/CodeGenHLSL/builtins/dot2add.hlsl`
- [ ] Add sema tests to `clang/test/SemaHLSL/BuiltIns/dot2add-errors.hlsl`
- [ ] Create the `int_dx_dot2add` intrinsic in `IntrinsicsDirectX.td`
- [ ] Create the `DXILOpMapping` of `int_dx_dot2add` to `162` in `DXIL.td`
- [ ] Create the `dot2add.ll` and `dot2add_errors.ll` tests in `llvm/test/CodeGen/DirectX/`
- [ ] Create the `int_spv_dot2add` intrinsic in `IntrinsicsSPIRV.td`
- [ ] In SPIRVInstructionSelector.cpp create the `dot2add` lowering and map it to `int_spv_dot2add` in `SPIRVInstructionSelector::selectIntrinsic`.
- [ ] Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/dot2add.ll`
DirectX
SPIR-VOpDot:Description:Dot product of Vector 1 and Vector 2. Result Type must be a floating-point type scalar. Vector 1 and Vector 2 must be vectors of the same type, and their <table style="width:100%;"> Test Case(s)Example 1//dxc dot2add_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export float fn(half2 p1, half2 p2, float p3) {
return dot2add(p1, p2, p3);
} HLSL:Syntaxfloat dot2add(float16_t<2> a, float16_t<2> b, float c); Type Description
Minimum Shader ModelThis function is supported in the following shader models.
Shader StagesSee also |
dot2add
clang builtin,dot2add
clang builtin withhlsl_intrinsics.h
dot2add
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
dot2add
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/dot2add.hlsl
clang/test/SemaHLSL/BuiltIns/dot2add-errors.hlsl
int_dx_dot2add
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_dot2add
to162
inDXIL.td
dot2add.ll
anddot2add_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_dot2add
intrinsic inIntrinsicsSPIRV.td
dot2add
lowering and map it toint_spv_dot2add
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/dot2add.ll
DirectX
SPIR-V
OpDot:
Description:
Dot product of Vector 1 and Vector 2.
Result Type must be a floating-point type scalar.
Vector 1 and Vector 2 must be vectors of the same type, and their
component type must be Result Type.
5
148
<id>
Result Type
Result <id>
<id>
Vector 1
<id>
Vector 2
Test Case(s)
Example 1
HLSL:
Syntax
float dot2add(float16_t<2> a, float16_t<2> b, float c);
Type Description
Minimum Shader Model
This function is supported in the following shader models.
Shader Stages
See also
The text was updated successfully, but these errors were encountered: