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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_KHR_cooperative_matrix

Name

VK_KHR_cooperative_matrix - device extension

VK_KHR_cooperative_matrix

Name String

VK_KHR_cooperative_matrix

Extension Type

Device extension

Registered Extension Number

507

Revision

2

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

SPIR-V Dependencies
Contact
Extension Proposal

VK_KHR_cooperative_matrix

Other Extension Metadata

Last Modified Date

2023-05-03

Interactions and External Dependencies
Contributors
  • Jeff Bolz, NVIDIA

  • Markus Tavenrath, NVIDIA

  • Daniel Koch, NVIDIA

  • Kevin Petit, Arm Ltd.

  • Boris Zanin, AMD

Description

This extension adds support for using cooperative matrix types in SPIR-V. Cooperative matrix types are medium-sized matrices that are primarily supported in compute shaders, where the storage for the matrix is spread across all invocations in some scope (usually a subgroup) and those invocations cooperate to efficiently perform matrix multiplies.

Cooperative matrix types are defined by the SPV_KHR_cooperative_matrix SPIR-V extension and can be used with the GLSL_KHR_cooperative_matrix GLSL extension.

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

New Commands

New Structures

New Enums

New Enum Constants

New SPIR-V Capabilities

Issues

  1. ) How does cooperativeMatrixRobustBufferAccess interact with nullDescriptor?

RESOLVED: nullDescriptor is not allowed here While drivers can handle going OOB into a buffer, if there is not buffer, via nullDescriptor, it is invalid to load/store from the cooperative matrix.

Version History

  • Revision 2, 2023-05-03 (Kevin Petit)

    • First KHR revision

  • Revision 1, 2019-02-05 (Jeff Bolz)

    • NVIDIA vendor extension

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_KHR_cooperative_matrix.hs
valuegetPhysicalDeviceCooperativeMatrixPropertiesKHR
  1. :: MonadIO io
  2. => PhysicalDevice

    physicalDevice is the physical device.

  3. -> io (Result, "properties" ::: Vector CooperativeMatrixPropertiesKHR)
#

vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR - Returns properties describing what cooperative matrix types are supported

Description

If pProperties is NULL, then the number of cooperative matrix 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 of cooperative matrix properties available, at most pPropertyCount structures will be written, and INCOMPLETE will be returned instead of SUCCESS, to indicate that not all the available cooperative matrix properties were returned.

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 CooperativeMatrixPropertiesKHR structures

Return Codes

Success
Failure

See Also

VK_KHR_cooperative_matrix, CooperativeMatrixPropertiesKHR, PhysicalDevice

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

Members

This structure describes the following features:

Description

If the PhysicalDeviceCooperativeMatrixFeaturesKHR 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 PhysicalDeviceCooperativeMatrixFeaturesKHR, 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_KHR_cooperative_matrix, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkCooperativeMatrixPropertiesKHR - Structure specifying cooperative matrix properties

Description

If some types are preferred over other types (e.g. for performance), they should appear earlier in the list enumerated by getPhysicalDeviceCooperativeMatrixPropertiesKHR.

At least one entry in the list must have power of two values for all of MSize, KSize, and NSize.

If the cooperativeMatrixWorkgroupScope feature is not supported, scope must be SCOPE_SUBGROUP_KHR.

Valid Usage (Implicit)

See Also

VK_KHR_cooperative_matrix, Bool32, ComponentTypeKHR, ScopeKHR, StructureType, getPhysicalDeviceCooperativeMatrixPropertiesKHR

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceCooperativeMatrixPropertiesKHR - Structure describing cooperative matrix properties supported by an implementation

Description

cooperativeMatrixSupportedStages must not have any bits other than SHADER_STAGE_COMPUTE_BIT set.

If the PhysicalDeviceCooperativeMatrixPropertiesKHR 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_KHR_cooperative_matrix, ShaderStageFlags, StructureType

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