vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_NV_cooperative_matrix2

Description

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.

Synopsis

Documentation

getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV Source #

Arguments

:: MonadIO io 
=> PhysicalDevice

physicalDevice is the physical device.

-> io (Result, "properties" ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV) 

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

data PhysicalDeviceCooperativeMatrix2FeaturesNV Source #

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.

Valid Usage (Implicit)

See Also

VK_NV_cooperative_matrix2, Bool32, StructureType

Constructors

PhysicalDeviceCooperativeMatrix2FeaturesNV 

Fields

  • 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.

Instances

Instances details
Eq PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Storable PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Show PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

FromCStruct PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

ToCStruct PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Zero PhysicalDeviceCooperativeMatrix2FeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

data PhysicalDeviceCooperativeMatrix2PropertiesNV Source #

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.

Valid Usage (Implicit)

See Also

VK_NV_cooperative_matrix2, StructureType

Constructors

PhysicalDeviceCooperativeMatrix2PropertiesNV 

Fields

Instances

Instances details
Eq PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Storable PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Show PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

FromCStruct PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

ToCStruct PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Zero PhysicalDeviceCooperativeMatrix2PropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

data CooperativeMatrixFlexibleDimensionsPropertiesNV Source #

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

CooperativeMatrixFlexibleDimensionsPropertiesNV 

Fields

Instances

Instances details
Eq CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Storable CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Show CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

FromCStruct CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

ToCStruct CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

Zero CooperativeMatrixFlexibleDimensionsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_matrix2

type NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME = "VK_NV_cooperative_matrix2" Source #

newtype ScopeKHR Source #

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

ScopeKHR Int32 

Bundled Patterns

pattern SCOPE_DEVICE_KHR :: ScopeKHR 
pattern SCOPE_QUEUE_FAMILY_KHR :: ScopeKHR 
pattern SCOPE_SUBGROUP_KHR :: ScopeKHR 
pattern SCOPE_WORKGROUP_KHR :: ScopeKHR 

Instances

Instances details
Eq ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Ord ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Storable ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Read ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Show ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Zero ScopeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Methods

zero :: ScopeKHR Source #

newtype ComponentTypeKHR Source #

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

Constructors

ComponentTypeKHR Int32 

Instances

Instances details
Eq ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector

Ord ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector

Storable ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector

Read ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector

Show ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector

Zero ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_cooperative_vector