Which document does this relate to?
|
template <ComponentEnum DstTy, ComponentEnum SrcTy, int SrcN> struct DstN { |
|
static const int Value = |
|
(SrcN * ComponentTypeTraits<SrcTy>::ElementsPerScalar) / |
|
ComponentTypeTraits<DstTy>::ElementsPerScalar; |
|
}; |
|
|
Describe the issue you see with the spec
linalg::Convert calculates incorrect DstN value, the current formula performs integer division with truncation, but the result needs to be rounded up.
e.g. Convert F16->Fp8, SrcN=3, result in a DstN=0.
Additional context
DXC has fix that microsoft/DirectXShaderCompiler#8359, spec needs to be updated.
Which document does this relate to?
hlsl-specs/proposals/0035-linalg-matrix.md
Lines 717 to 722 in 4412bb3
Describe the issue you see with the spec
linalg::Convert calculates incorrect DstN value, the current formula performs integer division with truncation, but the result needs to be rounded up.
e.g. Convert F16->Fp8, SrcN=3, result in a DstN=0.
Additional context
DXC has fix that microsoft/DirectXShaderCompiler#8359, spec needs to be updated.