Skip to content

[SM6.10] Implement VectorAccumDescriptor Builtin#8448

Open
V-FEXrt wants to merge 6 commits into
microsoft:mainfrom
V-FEXrt:linalg-vec-accum-to-descriptor
Open

[SM6.10] Implement VectorAccumDescriptor Builtin#8448
V-FEXrt wants to merge 6 commits into
microsoft:mainfrom
V-FEXrt:linalg-vec-accum-to-descriptor

Conversation

@V-FEXrt
Copy link
Copy Markdown
Collaborator

@V-FEXrt V-FEXrt commented May 12, 2026

Implements VectorAccumulateToDescriptor builtin and updates the header implementation.

Fixes #8416

Co-Authored-By: @pow2clk

@@ -33,7 +33,7 @@ target triple = "dxil-ms-dx"
@"\01?SharedArr@@3PAMA" = external addrspace(3) global [64 x float], align 4

define void @mainAS() {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests updates still need to be moved per #8315

but I'm still kicking that can down the road:)

Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good, with just a "Matrix" nit and a question about whether we should have included an alignment parameter.

Comment thread utils/hct/hctdb.py
db_dxil_param(0, "v", "", ""),
db_dxil_param(2, "$o", "vector", "vector to accumulate"),
db_dxil_param(3, "res", "handle", "buffer to accumulate into"),
db_dxil_param(4, "i32", "offset", "starting offset in the buffer"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize the spec proposal didn't include an alignment parameter, but I can't help but wonder if that was a mistake.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tex3d @V-FEXrt. Yes, it would be nice to have an alignment parameter for this as well. If not in the PR then as a follow up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed an issue on the hlsl-specs proposal here:
microsoft/hlsl-specs#868

Adding the alignment parameter to the DXIL op would of course imply adding the parameter to the built-in intrinsic in this implementation as well.

Comment thread lib/HLSL/HLOperationLower.cpp Outdated
Comment thread docs/DXIL.rst Outdated
2147483678 LinAlgConvert Convert vector components from one interpretation to another
2147483679 ReservedE0 reserved
2147483680 ReservedE1 reserved
2147483679 VectorAccumulateToDescriptor Accumulates given vector to the buffer at the given offset
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, as you pointed out, the naming is inconsistent here. I actually had the LinAlg prefix in a commit that didn't make it into the spec PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

[SM6.10] Implement VectorAccumulate Spec

4 participants