CUTLASS 2.10 updates (#622)

Co-authored-by: Aniket Shivam <ashivam@nvidia.com>
This commit is contained in:
ANIKET SHIVAM
2022-09-12 21:26:30 -04:00
committed by GitHub
co-authored by Aniket Shivam
parent beae168f90
commit e773429f7e
96 changed files with 8365 additions and 1667 deletions
@@ -348,3 +348,16 @@ conv2d fprop_3x28x28x256_14x14_256x2x2_pad_h0w0_stride_h2w2_dil_h1w1_corr_alpha1
conv2d fprop_4x4x5x128_3x3_256x3x6_pad_h0w0_stride_h1w1_dil_h1w1_corr_alpha1_beta0 s8nhwc_s8nhwc_inhwc_i_i 164942943 4259285988 984016853 888753301
conv2d fprop_4x2x3x256_1x1_328x3x5_pad_h1w1_stride_h1w1_dil_h1w1_corr_alpha1_beta0 s8nhwc_s8nhwc_inhwc_i_i 2823094147 1681845497 4242738907 3244428635
conv2d fprop_1x17x11x288_17x11_160x3x3_pad_h1w1_stride_h1w1_dil_h1w1_corr_alpha2_beta2 s8nhwc_s8nhwc_inhwc_i_i 4060010502 2881035321 3927119619 3311661122
conv2d dgrad_1x11x7x64_6x4_8x1x1_pad_h0w0_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 4110991321 3464637181 1030377090 3211227145
conv2d dgrad_1x11x7x64_6x4_8x3x3_pad_h1w1_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 4110991321 1479940693 2379046159 2482639965
conv2d dgrad_1x13x11x64_8x7_8x1x1_pad_h1w1_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 832653836 1871463331 2718290800 1797658305
conv2d dgrad_1x17x19x64_9x10_16x2x2_pad_h1w1_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 3484040069 664160900 3954982568 985899371
conv2d dgrad_1x23x5x64_12x3_16x3x3_pad_h1w1_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 1513864544 1924855848 1728786974 3821277575
conv2d dgrad_1x55x51x256_28x26_512x1x1_pad_h0w0_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 868180534 1764715518 3998637379 2782670608
conv2d dgrad_1x27x23x256_9x7_512x3x3_pad_h0w0_stride_h3w3_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 3437976747 666906244 2107859856 831363691
conv2d dgrad_1x27x31x256_12x11_512x3x3_pad_h5w7_stride_h3w4_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 4195072693 1575210381 2486552517 3268706408
conv2d dgrad_1x27x35x256_15x9_512x7x5_pad_h11w7_stride_h3w5_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 3457330201 2316839359 1729888024 2308314800
conv2d dgrad_1x27x27x256_27x14_512x3x3_pad_h1w1_stride_h1w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 754609939 2469024119 464378888 544154978
conv2d dgrad_1x27x27x256_14x27_512x3x3_pad_h1w1_stride_h2w1_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 754609939 2469024119 464378888 3191247524
conv2d dgrad_3x28x28x256_14x14_256x2x2_pad_h0w0_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 1690216859 554790212 956712535 1281779197
conv2d dgrad_1x56x56x8_28x28_8x1x1_pad_h0w0_stride_h2w2_dil_h1w1_corr_alpha1_beta0 hnhwc_hnhwc_hnhwc_f_f 3184127693 835105643 4011933753 3207244654
@@ -42,8 +42,7 @@ import unittest
#
def TestGemmOperator(gemm_kind, math_inst, layout, alignment, tiling, arch, mixed=False,
epilogue_functor = EpilogueFunctor.LinearCombination,
swizzling_functor=cutlass.IdentitySwizzle1, **kwargs):
epilogue_functor=None, swizzling_functor=cutlass.IdentitySwizzle1, **kwargs):
"""
Test GEMM Operation based on configuration
"""
@@ -68,7 +67,7 @@ def TestGemmOperator(gemm_kind, math_inst, layout, alignment, tiling, arch, mixe
tile_description = TileDescription(
tiling[0], tiling[1], tiling[2],
math_inst, arch, arch
math_inst
)
A = TensorDescription(
@@ -84,11 +83,15 @@ def TestGemmOperator(gemm_kind, math_inst, layout, alignment, tiling, arch, mixe
)
element_epilogue = data_type[3]
if epilogue_functor is None:
epilogue_functor = LinearCombination(
C.element, C.alignment,
math_inst.element_accumulator, element_epilogue)
if gemm_kind == GemmKind.Universal:
operation = GemmOperationUniversal(
arch=arch, tile_description=tile_description,
A=A, B=B, C=C, element_epilogue=element_epilogue,
A=A, B=B, C=C,
epilogue_functor=epilogue_functor, swizzling_functor=swizzling_functor
)
if A.layout in [cutlass.ColumnMajorInterleaved32, cutlass.RowMajorInterleaved32]:
@@ -99,7 +102,7 @@ def TestGemmOperator(gemm_kind, math_inst, layout, alignment, tiling, arch, mixe
elif gemm_kind == GemmKind.Grouped:
operation = GemmOperationGrouped(
arch, tile_description, A, B, C,
element_epilogue, epilogue_functor, swizzling_functor,
epilogue_functor, swizzling_functor,
precompute_mode=kwargs["precompute_mode"]
)
testbed = TestbedGrouped(operation=operation)
@@ -110,7 +113,7 @@ def TestGemmOperator(gemm_kind, math_inst, layout, alignment, tiling, arch, mixe
def TestConv2dOperator(math_inst, alignment, tiling, arch,
stride_supports=[StrideSupport.Strided, StrideSupport.Strided, StrideSupport.Strided],
epilogue_functor=EpilogueFunctor.LinearCombination,
epilogue_functor=None,
swizzling_functor=cutlass.IdentitySwizzle1, interleaved=False, **kwargs):
"""
Test Conv2d Operation based on configurations
@@ -167,20 +170,24 @@ def TestConv2dOperator(math_inst, alignment, tiling, arch,
tile_description = TileDescription(
threadblock_shape=tiling[0], stages=tiling[1],
warp_count=tiling[2],
math_instruction=math_inst,
min_compute=arch, max_compute=arch
math_instruction=math_inst
)
if conv_kind == cutlass.conv.Operator.dgrad and stride_support == StrideSupport.Strided:
swizzling_functor = cutlass.StridedDgradIdentitySwizzle1
else:
swizzling_functor = default_swizzling_functor
if epilogue_functor is None:
epilogue_functor_ = LinearCombination(
C.element, C.alignment,
math_inst.element_accumulator, data_type[3])
operation = Conv2dOperation(
conv_kind=conv_kind, iterator_algorithm=cutlass.conv.IteratorAlgorithm.optimized,
arch=arch, tile_description=tile_description, A=A, B=B, C=C,
element_epilogue=data_type[3], stride_support=stride_support,
epilogue_functor=epilogue_functor,
stride_support=stride_support,
epilogue_functor=epilogue_functor_,
swizzling_functor=swizzling_functor
)
@@ -369,7 +376,11 @@ class Test_SM80(unittest.TestCase):
tiling = ([256, 64, 64], 4, [4, 1, 1])
data_type_mixed = [cutlass.int8, cutlass.int8, cutlass.int8, cutlass.float32]
self.assertTrue(TestGemmOperator(GemmKind.Universal, math_inst, layout, alignment_mixed, tiling, 80, False, data_type=data_type_mixed, epilogue_functor=EpilogueFunctor.FastLinearCombinationClamp))
epilogue_functor = FastLinearCombinationClamp(
data_type_mixed[2], alignment_mixed[2]
)
self.assertTrue(TestGemmOperator(GemmKind.Universal, math_inst, layout, alignment_mixed, tiling, 80, False, data_type=data_type_mixed, epilogue_functor=epilogue_functor))
stride_supports = [StrideSupport.Strided, StrideSupport.Strided, StrideSupport.Strided]
layout = [cutlass.TensorNC32HW32, cutlass.TensorC32RSK32, cutlass.TensorNC32HW32]
results = TestConv2dOperator(math_inst, alignment_mixed, tiling, 80, stride_supports=stride_supports, data_type=data_type_mixed, layout=layout, interleaved=True)
@@ -378,59 +389,59 @@ class Test_SM80(unittest.TestCase):
def SM80_SparseTensorOp_16832(self):
pass
def test_SM80_PlanarComplexTensorOp_16816(self):
def SM80_PlanarComplexTensorOp_16816(self):
pass
def test_SM80_SparseTensorOp_16816_fast_math(self):
def SM80_SparseTensorOp_16816_fast_math(self):
pass
def test_SM80_TensorOp_1688_complex(self):
def SM80_TensorOp_1688_complex(self):
pass
def test_SM80_TensorOp_1688_fast_fp32_math_complex(self):
def SM80_TensorOp_1688_fast_fp32_math_complex(self):
pass
def test_SM80_TensorOp_1688_rank_k(self):
def SM80_TensorOp_1688_rank_k(self):
pass
def test_SM80_TensorOp_1688_rank_k_complex(self):
def SM80_TensorOp_1688_rank_k_complex(self):
pass
def test_SM80_TensorOp_1688_trmm(self):
def SM80_TensorOp_1688_trmm(self):
pass
def test_SM80_TensorOp_1688_trmm_complex(self):
def SM80_TensorOp_1688_trmm_complex(self):
pass
def test_SM80_TensorOp_1688_symm(self):
def SM80_TensorOp_1688_symm(self):
pass
def test_SM80_TensorOp_1688_symm_complex(self):
def SM80_TensorOp_1688_symm_complex(self):
pass
def test_SM80_TensorOp_884_complex(self):
def SM80_TensorOp_884_complex(self):
pass
def test_SM80_TensorOp_884_complex_gaussian(self):
def SM80_TensorOp_884_complex_gaussian(self):
pass
def test_SM80_TensorOp_884_rank_k(self):
def SM80_TensorOp_884_rank_k(self):
pass
def test_SM80_TensorOp_884_rank_k_complex(self):
def SM80_TensorOp_884_rank_k_complex(self):
pass
def test_SM80_TensorOp_884_rank_k_complex_gaussian(self):
def SM80_TensorOp_884_rank_k_complex_gaussian(self):
pass
def test_SM80_TensorOp_884_trmm(self):
def SM80_TensorOp_884_trmm(self):
pass
def test_SM80_TensorOp_884_trmm_complex(self):
def SM80_TensorOp_884_trmm_complex(self):
pass
def test_SM80_TensorOp_884_trmm_complex_gaussian(self):
def SM80_TensorOp_884_trmm_complex_gaussian(self):
pass
def test_SM80_TensorOp_884_symm(self):
def SM80_TensorOp_884_symm(self):
pass
def test_SM80_TensorOp_884_symm_complex(self):
def SM80_TensorOp_884_symm_complex(self):
pass
def test_SM80_TensorOp_884_symm_complex_gaussian(self):
def SM80_TensorOp_884_symm_complex_gaussian(self):
pass
def test_SM80_SparseTensorOp_16864_TN(self):
def SM80_SparseTensorOp_16864_TN(self):
pass
def test_SM80_TensorOp_16864_TN(self):
def SM80_TensorOp_16864_TN(self):
pass
def test_SM80_SparseTensorOp_168128_TN(self):
def SM80_SparseTensorOp_168128_TN(self):
pass
def test_SM80_TensorOp_16864_Interleaved(self):
def SM80_TensorOp_16864_Interleaved(self):
pass
def test_SM80_TensorOp_168256(self):
def SM80_TensorOp_168256(self):
pass
def test_SM80_Simt_complex(self):
def SM80_Simt_complex(self):
pass