vulkan
Safe HaskellSafe-Inferred
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

:: forall io. 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. PhysicalDeviceCooperativeMatrix2FeaturesNV can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

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

Eq 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
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

Eq 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
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

Eq 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 #

pattern NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a 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, CooperativeMatrixFlexibleDimensionsPropertiesNV, CooperativeMatrixPropertiesKHR

Constructors

ScopeKHR Int32 

Bundled Patterns

pattern SCOPE_DEVICE_KHR :: ScopeKHR

SCOPE_DEVICE_KHR corresponds to SPIR-V Device scope.

pattern SCOPE_WORKGROUP_KHR :: ScopeKHR

SCOPE_WORKGROUP_KHR corresponds to SPIR-V Workgroup scope.

pattern SCOPE_SUBGROUP_KHR :: ScopeKHR

SCOPE_SUBGROUP_KHR corresponds to SPIR-V Subgroup scope.

pattern SCOPE_QUEUE_FAMILY_KHR :: ScopeKHR

SCOPE_QUEUE_FAMILY_KHR corresponds to SPIR-V QueueFamily scope.

Instances

Instances details
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

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

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

See Also

VK_KHR_cooperative_matrix, CooperativeMatrixFlexibleDimensionsPropertiesNV, CooperativeMatrixPropertiesKHR

Constructors

ComponentTypeKHR Int32 

Bundled Patterns

pattern COMPONENT_TYPE_FLOAT16_KHR :: ComponentTypeKHR

COMPONENT_TYPE_FLOAT16_KHR corresponds to SPIR-V OpTypeFloat 16.

pattern COMPONENT_TYPE_FLOAT32_KHR :: ComponentTypeKHR

COMPONENT_TYPE_FLOAT32_KHR corresponds to SPIR-V OpTypeFloat 32.

pattern COMPONENT_TYPE_FLOAT64_KHR :: ComponentTypeKHR

COMPONENT_TYPE_FLOAT64_KHR corresponds to SPIR-V OpTypeFloat 64.

pattern COMPONENT_TYPE_SINT8_KHR :: ComponentTypeKHR

COMPONENT_TYPE_SINT8_KHR corresponds to SPIR-V OpTypeInt 8 0/1.

pattern COMPONENT_TYPE_SINT16_KHR :: ComponentTypeKHR

COMPONENT_TYPE_SINT16_KHR corresponds to SPIR-V OpTypeInt 16 0/1.

pattern COMPONENT_TYPE_SINT32_KHR :: ComponentTypeKHR

COMPONENT_TYPE_SINT32_KHR corresponds to SPIR-V OpTypeInt 32 0/1.

pattern COMPONENT_TYPE_SINT64_KHR :: ComponentTypeKHR

COMPONENT_TYPE_SINT64_KHR corresponds to SPIR-V OpTypeInt 64 0/1.

pattern COMPONENT_TYPE_UINT8_KHR :: ComponentTypeKHR

COMPONENT_TYPE_UINT8_KHR corresponds to SPIR-V OpTypeInt 8 0/1.

pattern COMPONENT_TYPE_UINT16_KHR :: ComponentTypeKHR

COMPONENT_TYPE_UINT16_KHR corresponds to SPIR-V OpTypeInt 16 0/1.

pattern COMPONENT_TYPE_UINT32_KHR :: ComponentTypeKHR

COMPONENT_TYPE_UINT32_KHR corresponds to SPIR-V OpTypeInt 32 0/1.

pattern COMPONENT_TYPE_UINT64_KHR :: ComponentTypeKHR

COMPONENT_TYPE_UINT64_KHR corresponds to SPIR-V OpTypeInt 64 0/1.

Instances

Instances details
Storable ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Read ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Show ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Eq ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Ord ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix

Zero ComponentTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_cooperative_matrix