You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for vectors longer than 4 (long vectors) with some restrictions.
Is your feature request related to a problem? Please describe.
ML applications require vectors longer than the graphics-centric limit of 4 vector elements. Allowing longer vectors will better enable these applications to take advantage of hardware support and ease novel ML application development.
Describe the solution you'd like
Allow declaration and use of vectors longer than 4 elements (long vectors) as locals, groupshared, non-entry parameters, non-entry return types, and contents of raw buffers. These should be useable by HLSL operators and elementwise builtins.
These vectors will be declared using the existing template declarations. Existing defaults such as default vector length will be maintained to preserve behavior of existing shaders. Accessing such vectors will be exclusively through existing subscript operation as the member-style xyzw (or rgba) are specific to the interpretation of shorter vectors in a graphics context.
Describe alternatives you've considered
A bespoke, opaque vector type intended for ML applications was considered, but discarded in favor of extending the existing vector representations.
Additional context
While all elementwise DXIL intrinsics are supported, initial support might implement such support as scalarized breakdowns.
Support for this feature may be implemented in stages:
declaring long vectors in the various contexts it is supported
loading long vectors from byteaddressbuffers
loading long vectors from structuredbuffers
generating native vectors operations for supported elementwise intrinsics
generating scalarized implementations for all other elementwise intrinsics
Where matrices are represented as vectors, the max size is actually 16. There are many places in the DXC code where the lenght limit of 4 or 16 is pervasive. There are several esoteric changes that need to be made besides just allowing the validator to accept such vectors. Many of these will be included in the changes that require them, but others might require more individual changes along the way.
The text was updated successfully, but these errors were encountered:
Add support for vectors longer than 4 (long vectors) with some restrictions.
Is your feature request related to a problem? Please describe.
ML applications require vectors longer than the graphics-centric limit of 4 vector elements. Allowing longer vectors will better enable these applications to take advantage of hardware support and ease novel ML application development.
Describe the solution you'd like
Allow declaration and use of vectors longer than 4 elements (long vectors) as locals, groupshared, non-entry parameters, non-entry return types, and contents of raw buffers. These should be useable by HLSL operators and elementwise builtins.
These vectors will be declared using the existing template declarations. Existing defaults such as default vector length will be maintained to preserve behavior of existing shaders. Accessing such vectors will be exclusively through existing subscript operation as the member-style xyzw (or rgba) are specific to the interpretation of shorter vectors in a graphics context.
Describe alternatives you've considered
A bespoke, opaque vector type intended for ML applications was considered, but discarded in favor of extending the existing vector representations.
Additional context
While all elementwise DXIL intrinsics are supported, initial support might implement such support as scalarized breakdowns.
Support for this feature may be implemented in stages:
Where matrices are represented as vectors, the max size is actually 16. There are many places in the DXC code where the lenght limit of 4 or 16 is pervasive. There are several esoteric changes that need to be made besides just allowing the validator to accept such vectors. Many of these will be included in the changes that require them, but others might require more individual changes along the way.
The text was updated successfully, but these errors were encountered: