Skip to content

Commit ba9b278

Browse files
authored
Support cooperative vector (#6223)
* Support cooperative vector without Vulkan-header update Adding a Slang support for cooperative vector. But this commit doesn't have Vulkan-header update.
1 parent 2ae194d commit ba9b278

File tree

104 files changed

+5381
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5381
-26
lines changed

docs/user-guide/a3-02-reference-capability-atoms.md

+34
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ Versions
269269
> HLSL shader model 6.7 and related capabilities of other targets.
270270
> Includes related GLSL/SPIRV extensions.
271271
272+
`sm_6_8_version`
273+
> HLSL shader model 6.8 and related capabilities of other targets.
274+
> Does not include related GLSL/SPIRV extensions.
275+
276+
`sm_6_8`
277+
> HLSL shader model 6.8 and related capabilities of other targets.
278+
> Includes related GLSL/SPIRV extensions.
279+
272280
`GLSL_130`
273281
> GLSL 130 and related capabilities of other targets.
274282
@@ -407,6 +415,12 @@ Extensions
407415
`SPV_GOOGLE_user_type`
408416
> Represents the SPIR-V extension for SPV_GOOGLE_user_type.
409417
418+
`SPV_EXT_replicated_composites`
419+
> Represents the SPIR-V extension for SPV_EXT_replicated_composites.
420+
421+
`SPV_NV_cooperative_vector`
422+
> Represents the SPIR-V extension for SPV_NV_cooperative_vector.
423+
410424
`spvAtomicFloat32AddEXT`
411425
> Represents the SPIR-V capability for atomic float 32 add operations.
412426
@@ -509,6 +523,15 @@ Extensions
509523
`spvDemoteToHelperInvocation`
510524
> Represents the SPIR-V capability for demoting to helper invocation.
511525
526+
`spvReplicatedCompositesEXT`
527+
> Represents the SPIR-V capability for replicated composites
528+
529+
`spvCooperativeVectorNV`
530+
> Represents the SPIR-V capability for cooperative vectors
531+
532+
`spvCooperativeVectorTrainingNV`
533+
> Represents the SPIR-V capability for cooperative vector training
534+
512535
`spvMaximalReconvergenceKHR`
513536
> Represents the SPIR-V capability for maximal reconvergence.
514537
@@ -861,6 +884,14 @@ Compound Capabilities
861884
`bufferreference_int64`
862885
> Capabilities needed to use GLSL buffer-reference's with int64
863886
887+
`cooperative_vector`
888+
> Capabilities needed to use cooperative vectors
889+
> Note that cpp and cuda are supported via a fallback non-cooperative implementation
890+
> No HLSL shader model bound yet
891+
892+
`cooperative_vector_training`
893+
> Capabilities needed to train cooperative vectors
894+
864895
`any_stage`
865896
> Collection of all shader stages
866897
@@ -1220,6 +1251,9 @@ Other
12201251
`DX_6_7`
12211252
> Use `sm_6_7` instead
12221253
1254+
`DX_6_8`
1255+
> Use `sm_6_8` instead
1256+
12231257
`GLSL_410_SPIRV_1_0`
12241258
> User should not use this capability
12251259

source/slang/core.meta.slang

+12
Original file line numberDiff line numberDiff line change
@@ -3234,6 +3234,18 @@ int __alignOf_intrinsic<T>()
32343234
return __alignOf_intrinsic_impl<T>(__default<T>());
32353235
}
32363236

3237+
[__unsafeForceInlineEarly]
3238+
int32_t __elemToByteOffset<T>(int32_t elemOffset)
3239+
{
3240+
return elemOffset * __naturalStrideOf<T>();
3241+
}
3242+
3243+
[__unsafeForceInlineEarly]
3244+
int32_t __byteToElemOffset<T>(int32_t byteOffset)
3245+
{
3246+
return byteOffset / __naturalStrideOf<T>();
3247+
}
3248+
32373249
__intrinsic_op($(kIROp_TreatAsDynamicUniform))
32383250
T asDynamicUniform<T>(T v);
32393251

0 commit comments

Comments
 (0)