| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_cooperative_vector
Description
Name
VK_NV_cooperative_vector - device extension
VK_NV_cooperative_vector
- Name String
VK_NV_cooperative_vector
- Extension Type
- Device extension
- Registered Extension Number
- 492
- Revision
- 4
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2 or Vulkan Version 1.1
- SPIR-V Dependencies
- Contact
- Extension Proposal
- VK_NV_cooperative_vector
Other Extension Metadata
- Last Modified Date
- 2024-05-23
- Interactions and External Dependencies
- This extension requires SPV_NV_cooperative_vector
- This extension provides API support for GL_NV_cooperative_vector
- Contributors
- Jeff Bolz, NVIDIA
Description
This extension adds support for using cooperative vector types in SPIR-V. Unlike cooperative matrix types, a variable with a cooperative vector type is logically stored in the invocation it belongs to, but they can cooperate behind the scenes when performing matrix-vector multiplies. Cooperative vectors do not require a fully occupied subgroup or uniform control flow like cooperative matrices, although these do increase the likelihood of being on the fast path. And unlike normal vector types, they have arbitrary length and support a relatively limited set of operations. These types are intended to help accelerate the evaluation of small neural networks, where each invocation is performing its own independent evaluation of the network.
Cooperative vector types are defined by the SPV_NV_cooperative_vector SPIR-V extension and can be used with the GL_NV_cooperative_vector GLSL extension.
This extension includes support for enumerating the combinations of types that are supported by the implementation, and for converting matrix data to and from an optimized opaque layout.
New Commands
New Structures
CooperativeVectorPropertiesNVExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Unions
New Enums
New Enum Constants
NV_COOPERATIVE_VECTOR_SPEC_VERSIONExtending
ComponentTypeKHR:Extending
PipelineStageFlagBits2:Extending
StructureType:
New SPIR-V Capabilities
Version History
Revision 4, 2024-05-23 (Jeff Bolz)
- Add maxCooperativeVectorComponents
Revision 3, 2024-05-23 (Jeff Bolz)
- Add training functions
Revision 2, 2024-02-10 (Jeff Bolz)
- Add device-side matrix conversion
Revision 1, 2023-12-13 (Jeff Bolz)
- Initial revisions
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
- getPhysicalDeviceCooperativeVectorPropertiesNV :: MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
- convertCooperativeVectorMatrixNV :: MonadIO io => Device -> ConvertCooperativeVectorMatrixInfoNV -> io Result
- cmdConvertCooperativeVectorMatrixNV :: MonadIO io => CommandBuffer -> ("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV) -> io ()
- pattern COMPONENT_TYPE_FLOAT_E4M3_NV :: ComponentTypeKHR
- pattern COMPONENT_TYPE_FLOAT_E5M2_NV :: ComponentTypeKHR
- data PhysicalDeviceCooperativeVectorFeaturesNV = PhysicalDeviceCooperativeVectorFeaturesNV {}
- data CooperativeVectorPropertiesNV = CooperativeVectorPropertiesNV {}
- data PhysicalDeviceCooperativeVectorPropertiesNV = PhysicalDeviceCooperativeVectorPropertiesNV {}
- data ConvertCooperativeVectorMatrixInfoNV = ConvertCooperativeVectorMatrixInfoNV {
- srcSize :: Word64
- srcData :: DeviceOrHostAddressConstKHR
- dstSize :: Ptr CSize
- dstData :: DeviceOrHostAddressKHR
- srcComponentType :: ComponentTypeKHR
- dstComponentType :: ComponentTypeKHR
- numRows :: Word32
- numColumns :: Word32
- srcLayout :: CooperativeVectorMatrixLayoutNV
- srcStride :: Word64
- dstLayout :: CooperativeVectorMatrixLayoutNV
- dstStride :: Word64
- newtype ComponentTypeKHR where
- ComponentTypeKHR Int32
- pattern COMPONENT_TYPE_FLOAT16_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_FLOAT32_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_FLOAT64_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_SINT8_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_SINT16_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_SINT32_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_SINT64_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_UINT8_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_UINT16_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_UINT32_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_UINT64_KHR :: ComponentTypeKHR
- pattern COMPONENT_TYPE_FLOAT8_E5M2_EXT :: ComponentTypeKHR
- pattern COMPONENT_TYPE_FLOAT8_E4M3_EXT :: ComponentTypeKHR
- pattern COMPONENT_TYPE_UINT8_PACKED_NV :: ComponentTypeKHR
- pattern COMPONENT_TYPE_SINT8_PACKED_NV :: ComponentTypeKHR
- pattern COMPONENT_TYPE_BFLOAT16_KHR :: ComponentTypeKHR
- newtype CooperativeVectorMatrixLayoutNV where
- CooperativeVectorMatrixLayoutNV Int32
- pattern COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV :: CooperativeVectorMatrixLayoutNV
- pattern COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV :: CooperativeVectorMatrixLayoutNV
- pattern COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV :: CooperativeVectorMatrixLayoutNV
- pattern COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV :: CooperativeVectorMatrixLayoutNV
- type NV_COOPERATIVE_VECTOR_SPEC_VERSION = 4
- pattern NV_COOPERATIVE_VECTOR_SPEC_VERSION :: Integral a => a
- type NV_COOPERATIVE_VECTOR_EXTENSION_NAME = "VK_NV_cooperative_vector"
- pattern NV_COOPERATIVE_VECTOR_EXTENSION_NAME :: (Eq a, IsString a) => a
- data DeviceOrHostAddressKHR
- = DeviceAddress DeviceAddress
- | HostAddress (Ptr ())
- data DeviceOrHostAddressConstKHR
Documentation
getPhysicalDeviceCooperativeVectorPropertiesNV Source #
Arguments
| :: MonadIO io | |
| => PhysicalDevice |
|
| -> io (Result, "properties" ::: Vector CooperativeVectorPropertiesNV) |
vkGetPhysicalDeviceCooperativeVectorPropertiesNV - Returns properties describing what cooperative vector types are supported
Description
If pProperties is NULL, then the number of cooperative vector
properties available is returned in pPropertyCount. Otherwise,
pPropertyCount must point to a variable set by the user 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 vector 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 vector properties were
returned.
Valid Usage (Implicit)
-
physicalDevicemust be a validPhysicalDevicehandle
-
pPropertyCountmust be a valid pointer to auint32_tvalue -
If the value referenced by
pPropertyCountis not0, andpPropertiesis notNULL,pPropertiesmust be a valid pointer to an array ofpPropertyCountCooperativeVectorPropertiesNVstructures
Return Codes
See Also
VK_NV_cooperative_vector,
CooperativeVectorPropertiesNV, PhysicalDevice
convertCooperativeVectorMatrixNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> ConvertCooperativeVectorMatrixInfoNV |
|
| -> io Result |
vkConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another
Description
If pInfo->dstData is NULL, then the number of bytes required to
store the converted matrix is returned in pDstSize. Otherwise,
pInfo->pDstSize must point to a variable set by the user to the
number of bytes in pInfo->dstData, and on return the variable is
overwritten with the number of bytes actually written to
pInfo->dstData. pInfo->srcData can be NULL when pInfo->dstData
is NULL. If pInfo->pDstSize is less than the number of bytes
required to store the converted matrix, no bytes will be written, and
INCOMPLETE will be returned instead of
SUCCESS, to indicate that not enough space
was provided.
Valid Usage
- If
pInfo->srcData.hostAddressis notNULL, thenpInfo->srcSizemust be large enough to contain the source matrix, based either on the standard matrix layout or based on the size filled out by this command - If
pInfo->dstData.hostAddressis notNULL, then the value pointed to bypInfo->pDstSizemust be large enough to contain the destination matrix, based either on the standard matrix layout or based on the size filled out by this command - If
pInfo->dstData.hostAddressis notNULL, the source and destination memory ranges must not overlap
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pInfomust be a valid pointer to a validConvertCooperativeVectorMatrixInfoNVstructure
Return Codes
See Also
VK_NV_cooperative_vector,
ConvertCooperativeVectorMatrixInfoNV, Device
cmdConvertCooperativeVectorMatrixNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV) |
|
| -> io () |
vkCmdConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another
Description
This command does the same conversions as
convertCooperativeVectorMatrixNV, but executes on the device. One
conversion is performed for each of the infoCount elements of
pInfos.
This command’s execution is synchronized using
PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV.
Valid Usage
- For each
element of
pInfo,srcData.deviceAddressmust be a validDeviceAddress
- For each
element of
pInfo,dstData.deviceAddressmust be a validDeviceAddress - For each
element of
pInfo,srcData.deviceAddressmust be 64 byte aligned - For each
element of
pInfo,dstData.deviceAddressmust be 64 byte aligned - For each
element of
pInfo,srcSizemust be large enough to contain the source matrix, based either on the standard matrix layout or based on the size filled out byconvertCooperativeVectorMatrixNV - For each
element of
pInfo, the value pointed to bypDstSizemust be large enough to contain the destination matrix, based either on the standard matrix layout or based on the size filled out byconvertCooperativeVectorMatrixNV - Memory accessed by the sources and destinations of all of the conversions must not overlap
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfosmust be a valid pointer to an array ofinfoCountvalidConvertCooperativeVectorMatrixInfoNVstructures -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIT, orQUEUE_GRAPHICS_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
-
infoCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action |
Conditional Rendering
vkCmdConvertCooperativeVectorMatrixNV is not affected by conditional rendering
See Also
VK_NV_cooperative_vector,
CommandBuffer,
ConvertCooperativeVectorMatrixInfoNV
pattern COMPONENT_TYPE_FLOAT_E4M3_NV :: ComponentTypeKHR Source #
pattern COMPONENT_TYPE_FLOAT_E5M2_NV :: ComponentTypeKHR Source #
data PhysicalDeviceCooperativeVectorFeaturesNV Source #
VkPhysicalDeviceCooperativeVectorFeaturesNV - Structure describing cooperative vector features that can be supported by an implementation
Members
This structure describes the following features:
Description
If the PhysicalDeviceCooperativeVectorFeaturesNV 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
PhysicalDeviceCooperativeVectorFeaturesNV, 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
Constructors
| PhysicalDeviceCooperativeVectorFeaturesNV | |
Fields | |
Instances
data CooperativeVectorPropertiesNV Source #
VkCooperativeVectorPropertiesNV - Structure specifying cooperative vector properties
Description
COMPONENT_TYPE_SINT8_PACKED_NV and COMPONENT_TYPE_UINT8_PACKED_NV
must not be used for members other than inputInterpretation.
The following combinations must be supported (each row is a required combination):
| inputType | inputInterpretation | matrixInterpretation | biasInterpretation | resultType |
|---|---|---|---|---|
| FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16 |
| UINT32 | SINT8_PACKED | SINT8 | SINT32 | SINT32 |
| SINT8 | SINT8 | SINT8 | SINT32 | SINT32 |
| FLOAT32 | SINT8 | SINT8 | SINT32 | SINT32 |
| FLOAT16 | FLOAT_E4M3 | FLOAT_E4M3 | FLOAT16 | FLOAT16 |
| FLOAT16 | FLOAT_E5M2 | FLOAT_E5M2 | FLOAT16 | FLOAT16 |
Valid Usage (Implicit)
See Also
VK_NV_cooperative_vector,
Bool32, ComponentTypeKHR,
StructureType,
getPhysicalDeviceCooperativeVectorPropertiesNV
Constructors
| CooperativeVectorPropertiesNV | |
Fields
| |
Instances
data PhysicalDeviceCooperativeVectorPropertiesNV Source #
VkPhysicalDeviceCooperativeVectorPropertiesNV - Structure describing cooperative vector properties supported by an implementation
Description
If the PhysicalDeviceCooperativeVectorPropertiesNV 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_vector,
Bool32,
ShaderStageFlags,
StructureType
Constructors
| PhysicalDeviceCooperativeVectorPropertiesNV | |
Fields
| |
Instances
data ConvertCooperativeVectorMatrixInfoNV Source #
VkConvertCooperativeVectorMatrixInfoNV - Structure specifying a request to convert the layout and type of a cooperative vector matrix
Description
When called from cmdConvertCooperativeVectorMatrixNV, the
deviceAddress members of srcData and dstData are used. When called
from convertCooperativeVectorMatrixNV, the hostAddress members of
srcData and dstData are used.
For each of the source and destination matrix, if the layout is not
either COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV or
COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV, then the
corresponding stride parameter is ignored.
The size of the destination is only a function of the destination layout information, and does not depend on the source layout information.
Conversion can be used to convert between COMPONENT_TYPE_FLOAT32_KHR
or COMPONENT_TYPE_FLOAT16_KHR and any supported lower-precision
floating-point type. In this case, the conversion uses
round-to-nearest-even rounding.
Valid Usage
- If
srcLayoutis row-major or column-major, thensrcStridemust be greater than the length of a row/column, and a multiple of the element size
- If
dstLayoutis row-major or column-major, thendstStridemust be greater than the length of a row/column, and a multiple of the element size -
If
srcComponentTypeis not a supportedCooperativeVectorPropertiesNV::matrixInterpretationvalue as reported bygetPhysicalDeviceCooperativeVectorPropertiesNV, thensrcComponentTypemust beCOMPONENT_TYPE_FLOAT32_KHR -
If
dstComponentTypeis not a supportedCooperativeVectorPropertiesNV::matrixInterpretationvalue as reported bygetPhysicalDeviceCooperativeVectorPropertiesNV, thendstComponentTypemust beCOMPONENT_TYPE_FLOAT32_KHR -
If
srcComponentTypeanddstComponentTypeare not equal, then one must beCOMPONENT_TYPE_FLOAT32_KHRorCOMPONENT_TYPE_FLOAT16_KHRand the other must be a lower-precision floating-point type -
If
dstComponentTypeisCOMPONENT_TYPE_FLOAT_E4M3_NVorCOMPONENT_TYPE_FLOAT_E5M2_NV, thendstLayoutmust beCOOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NVorCOOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV
-
pNextmust beNULL -
srcDatamust be a validDeviceOrHostAddressConstKHRunion -
pDstSizemust be a valid pointer to asize_tvalue -
dstDatamust be a validDeviceOrHostAddressKHRunion -
srcComponentTypemust be a validComponentTypeKHRvalue -
dstComponentTypemust be a validComponentTypeKHRvalue -
srcLayoutmust be a validCooperativeVectorMatrixLayoutNVvalue -
dstLayoutmust be a validCooperativeVectorMatrixLayoutNVvalue
See Also
VK_NV_cooperative_vector,
ComponentTypeKHR, CooperativeVectorMatrixLayoutNV,
DeviceOrHostAddressConstKHR,
DeviceOrHostAddressKHR,
StructureType,
cmdConvertCooperativeVectorMatrixNV,
convertCooperativeVectorMatrixNV
Constructors
| ConvertCooperativeVectorMatrixInfoNV | |
Fields
| |
Instances
| Show ConvertCooperativeVectorMatrixInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_cooperative_vector Methods showsPrec :: Int -> ConvertCooperativeVectorMatrixInfoNV -> ShowS # show :: ConvertCooperativeVectorMatrixInfoNV -> String # showList :: [ConvertCooperativeVectorMatrixInfoNV] -> ShowS # | |
| ToCStruct ConvertCooperativeVectorMatrixInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_cooperative_vector Methods withCStruct :: ConvertCooperativeVectorMatrixInfoNV -> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr ConvertCooperativeVectorMatrixInfoNV -> ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero ConvertCooperativeVectorMatrixInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_cooperative_vector Methods | |
newtype ComponentTypeKHR Source #
VkComponentTypeKHR - Specify SPIR-V cooperative matrix component type
Description
COMPONENT_TYPE_FLOAT16_KHRcorresponds to SPIR-VOpTypeFloat16.
COMPONENT_TYPE_FLOAT32_KHRcorresponds to SPIR-VOpTypeFloat32.COMPONENT_TYPE_FLOAT64_KHRcorresponds to SPIR-VOpTypeFloat64.COMPONENT_TYPE_SINT8_KHRcorresponds to SPIR-VOpTypeInt8 0/1.COMPONENT_TYPE_SINT16_KHRcorresponds to SPIR-VOpTypeInt16 0/1.COMPONENT_TYPE_SINT32_KHRcorresponds to SPIR-VOpTypeInt32 0/1.COMPONENT_TYPE_SINT64_KHRcorresponds to SPIR-VOpTypeInt64 0/1.COMPONENT_TYPE_UINT8_KHRcorresponds to SPIR-VOpTypeInt8 0/1.COMPONENT_TYPE_UINT16_KHRcorresponds to SPIR-VOpTypeInt16 0/1.COMPONENT_TYPE_UINT32_KHRcorresponds to SPIR-VOpTypeInt32 0/1.COMPONENT_TYPE_UINT64_KHRcorresponds to SPIR-VOpTypeInt64 0/1.COMPONENT_TYPE_BFLOAT16_KHRcorresponds to SPIR-VOpTypeFloat16 BFloat16KHR.COMPONENT_TYPE_SINT8_PACKED_NVcorresponds to four 8-bit signed integers packed in a 32-bit unsigned integer.COMPONENT_TYPE_UINT8_PACKED_NVcorresponds to four 8-bit unsigned integers packed in a 32-bit unsigned integer.COMPONENT_TYPE_FLOAT_E4M3_NVcorresponds to a floating-point type with a sign bit in the most significant bit, followed by four exponent bits, followed by three mantissa bits.COMPONENT_TYPE_FLOAT_E5M2_NVcorresponds to a floating-point type with a sign bit in the most significant bit, followed by five exponent bits, followed by two mantissa bits.COMPONENT_TYPE_FLOAT8_E4M3_EXTcorresponds to SPIR-VOpTypeFloat8 Float8E4M3EXT.COMPONENT_TYPE_FLOAT8_E5M2_EXTcorresponds to SPIR-VOpTypeFloat8 Float8E5M2EXT.
See Also
VK_KHR_cooperative_matrix,
VK_NV_cooperative_matrix,
VK_NV_cooperative_vector,
ConvertCooperativeVectorMatrixInfoNV,
CooperativeMatrixFlexibleDimensionsPropertiesNV,
CooperativeMatrixPropertiesKHR,
CooperativeMatrixPropertiesNV,
CooperativeVectorPropertiesNV
Constructors
| ComponentTypeKHR Int32 |
Bundled Patterns
| pattern COMPONENT_TYPE_FLOAT16_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_FLOAT32_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_FLOAT64_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_SINT8_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_SINT16_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_SINT32_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_SINT64_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_UINT8_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_UINT16_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_UINT32_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_UINT64_KHR :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_FLOAT8_E5M2_EXT :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_FLOAT8_E4M3_EXT :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_UINT8_PACKED_NV :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_SINT8_PACKED_NV :: ComponentTypeKHR | |
| pattern COMPONENT_TYPE_BFLOAT16_KHR :: ComponentTypeKHR |
Instances
newtype CooperativeVectorMatrixLayoutNV Source #
VkCooperativeVectorMatrixLayoutNV - Specify cooperative vector matrix layout
Description
COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NVcorresponds to SPIR-VRowMajorNVlayout.
COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NVcorresponds to SPIR-VColumnMajorNVlayout.COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NVcorresponds to SPIR-VInferencingOptimalNVlayout.COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NVcorresponds to SPIR-VTrainingOptimalNVlayout.
All enum values match the corresponding SPIR-V value.
Row-major layout has elements of each row stored consecutively in
memory, with a controllable stride from the start of one row to the
start of the next row. Column-major layout has elements of each column
stored consecutively in memory, with a controllable stride from the
start of one column to the start of the next column. Inferencing-optimal
and Training-optimal layouts are implementation-dependent, and the
application can convert a matrix to those layouts using
convertCooperativeVectorMatrixNV or
cmdConvertCooperativeVectorMatrixNV. Training-optimal layout with
COMPONENT_TYPE_FLOAT16_KHR or COMPONENT_TYPE_FLOAT32_KHR type has
the additional guarantee that the application can reinterpret the data
as an array of elements and perform element-wise operations on the data,
and finite values in any padding elements do not affect the result of a
matrix-vector multiply (inf/NaN values may still cause NaN values in
the result).
See Also
VK_NV_cooperative_vector,
ConvertCooperativeVectorMatrixInfoNV
Constructors
| CooperativeVectorMatrixLayoutNV Int32 |
Bundled Patterns
Instances
type NV_COOPERATIVE_VECTOR_SPEC_VERSION = 4 Source #
pattern NV_COOPERATIVE_VECTOR_SPEC_VERSION :: Integral a => a Source #
type NV_COOPERATIVE_VECTOR_EXTENSION_NAME = "VK_NV_cooperative_vector" Source #
pattern NV_COOPERATIVE_VECTOR_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
data DeviceOrHostAddressKHR Source #
Constructors
| DeviceAddress DeviceAddress | |
| HostAddress (Ptr ()) |
Instances
| Show DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> DeviceOrHostAddressKHR -> ShowS # show :: DeviceOrHostAddressKHR -> String # showList :: [DeviceOrHostAddressKHR] -> ShowS # | |
| ToCStruct DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: DeviceOrHostAddressKHR -> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr DeviceOrHostAddressKHR -> DeviceOrHostAddressKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr DeviceOrHostAddressKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |
data DeviceOrHostAddressConstKHR Source #
Constructors
| DeviceAddressConst DeviceAddress | |
| HostAddressConst (Ptr ()) |
Instances
| Show DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> DeviceOrHostAddressConstKHR -> ShowS # show :: DeviceOrHostAddressConstKHR -> String # showList :: [DeviceOrHostAddressConstKHR] -> ShowS # | |
| ToCStruct DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: DeviceOrHostAddressConstKHR -> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr DeviceOrHostAddressConstKHR -> DeviceOrHostAddressConstKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |