HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_NV_cooperative_matrix2

Name

VK_NV_cooperative_matrix2 - device extension

VK_NV_cooperative_matrix2

Name String

VK_NV_cooperative_matrix2

Extension Type

Device extension

Registered Extension Number

594

Revision

1

Ratification Status

Not ratified

Extension and Version Dependencies

VK_KHR_cooperative_matrix

SPIR-V Dependencies
Contact
Extension Proposal

VK_NV_cooperative_matrix2

Other Extension Metadata

Last Modified Date

2024-08-01

Interactions and External Dependencies
Contributors
  • Jeff Bolz, NVIDIA

  • Karthik Vaidyanathan, NVIDIA

Description

This extension adds several new features building on the cooperative matrix types added in VK_KHR_cooperative_matrix. The goal is to add and accelerate features beyond just simple GEMM kernels, including adding support for type/use conversions, reductions, per-element operations, and tensor addressing, and also to improve usability and out-of-the-box performance by adding support for more flexible matrix sizes, and workgroup scope matrices with compiler-managed staging through shared memory.

The new functionality is defined by the SPV_NV_tensor_addressing and SPV_NV_cooperative_matrix2 SPIR-V extensions and can be used with the GLSL_NV_cooperative_matrix2 GLSL extension.

This extension includes support for enumerating the matrix types and dimensions that are supported by the implementation, and which specific features are supported.

New Commands

New Structures

New Enum Constants

New SPIR-V Capabilities

Version History

  • Revision 1, 2024-08-01 (Jeff Bolz)

    • Initial revision

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

  • 7 types
  • 1 value
  • Packagevulkan-3.27
  • Exports30
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_NV_cooperative_matrix2.hs

vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV - Returns properties describing what cooperative matrix types are supported

Description

If pProperties is NULL, then the number of flexible dimensions properties available is returned in pPropertyCount. Otherwise, pPropertyCount must point to a variable set by the application to the number of elements in the pProperties array, and on return the variable is overwritten with the number of structures actually written to pProperties. If pPropertyCount is less than the number flexible dimensions properties available, at most pPropertyCount structures will be written, and INCOMPLETE will be returned instead of SUCCESS, to indicate that not all the available flexible dimensions properties were returned.

If the cooperativeMatrixFlexibleDimensions feature is not supported, the implementation must advertise zero properties.

Valid Usage (Implicit)

  • pPropertyCount must be a valid pointer to a uint32_t value

  • If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount CooperativeMatrixFlexibleDimensionsPropertiesNV structures

Return Codes

Success
Failure

See Also

VK_NV_cooperative_matrix2, CooperativeMatrixFlexibleDimensionsPropertiesNV, PhysicalDevice

VkPhysicalDeviceCooperativeMatrix2FeaturesNV - Structure describing cooperative matrix features that can be supported by an implementation

Members

This structure describes the following features:

Description

If the PhysicalDeviceCooperativeMatrix2FeaturesNV structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceCooperativeMatrix2FeaturesNV, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Structure Chaining

Extends the structures

See Also

VK_NV_cooperative_matrix2, Bool32, StructureType

Constructors

  • PhysicalDeviceCooperativeMatrix2FeaturesNV
    • cooperativeMatrixWorkgroupScope :: Bool

      cooperativeMatrixWorkgroupScope indicates that the implementation supports workgroup scope cooperative matrices.

    • cooperativeMatrixFlexibleDimensions :: Bool

      cooperativeMatrixFlexibleDimensions indicates that the implementation supports cooperative matrix sizes that are a multiple of the granularity advertised in CooperativeMatrixFlexibleDimensionsPropertiesNV.

    • cooperativeMatrixReductions :: Bool

      cooperativeMatrixReductions indicates that the implementation supports the CooperativeMatrixReductionsNV SPIR-V capability. This allows performing (row, column, 2x2, or all element) reductions on matrices.

    • cooperativeMatrixConversions :: Bool

      cooperativeMatrixConversions indicates that the implementation supports the CooperativeMatrixConversionsNV SPIR-V capability. This allows converting accumulator matrices to A or B matrices.

    • cooperativeMatrixPerElementOperations :: Bool

      cooperativeMatrixPerElementOperations indicates that the implementation supports the CooperativeMatrixPerElementOperationsNV SPIR-V capability. This allows performing element-wise operations on matrix elements using a callback function.

    • cooperativeMatrixTensorAddressing :: Bool

      cooperativeMatrixTensorAddressing indicates that the implementation supports the TensorAddressingNV and CooperativeMatrixTensorAddressingNV SPIR-V capabilities. This allows using tensor layout and tensor view types for matrix loads and stores.

    • cooperativeMatrixBlockLoads :: Bool

      cooperativeMatrixBlockLoads indicates that the implementation supports the CooperativeMatrixBlockLoadsNV SPIR-V capability. This allows setting block size for loads and using a callback function to decode block elements.

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceCooperativeMatrix2PropertiesNV - Structure describing cooperative matrix properties supported by an implementation

Description

If the PhysicalDeviceCooperativeMatrix2PropertiesNV structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Structure Chaining

Extends the structure

See Also

VK_NV_cooperative_matrix2, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkCooperativeMatrixFlexibleDimensionsPropertiesNV - Structure specifying cooperative matrix properties

Description

Rather than explicitly enumerating a list of supported sizes, CooperativeMatrixFlexibleDimensionsPropertiesNV advertises size granularities, where the matrix must be a multiple of the advertised size. The M and K granularities apply to rows and columns of matrices with Use of MatrixA, K, and N apply to rows and columns of matrices with Use of MatrixB, M, and N apply to rows and columns of matrices with Use of MatrixAccumulator.

For a given type combination, if multiple workgroup sizes are supported there may be multiple CooperativeMatrixFlexibleDimensionsPropertiesNV structures with different granularities.

All granularity values must be powers of two.

Different A/B types may require different granularities but share the same accumulator type. In such a case, the supported granularity for a matrix with the accumulator type would be the smallest advertised granularity.

Valid Usage (Implicit)

See Also

VK_NV_cooperative_matrix2, Bool32, ComponentTypeKHR, ScopeKHR, StructureType, getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
newtypenewtype ScopeKHR
#

VkScopeKHR - Specify SPIR-V scope

Description

All enum values match the corresponding SPIR-V value.

See Also

VK_KHR_cooperative_matrix, VK_NV_cooperative_matrix, CooperativeMatrixFlexibleDimensionsPropertiesNV, CooperativeMatrixPropertiesKHR, CooperativeMatrixPropertiesNV

Constructors

Instances6Eq, Ord, Read, Show, Storable, Zero
  • Eq ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
  • Ord ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
  • Read ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
  • Show ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
  • Storable ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
  • Zero ScopeKHRDefined in vulkan-3.27 · Vulkan.Extensions.VK_KHR_cooperative_matrix
newtypenewtype ComponentTypeKHR
#

VkComponentTypeKHR - Specify SPIR-V cooperative matrix component type

Description

See Also

VK_KHR_cooperative_matrix, VK_NV_cooperative_matrix, VK_NV_cooperative_vector, ConvertCooperativeVectorMatrixInfoNV, CooperativeMatrixFlexibleDimensionsPropertiesNV, CooperativeMatrixPropertiesKHR, CooperativeMatrixPropertiesNV, CooperativeVectorPropertiesNV

Instances6Eq, Ord, Read, Show, Storable, Zero