(args)
| 710 | |
| 711 | |
| 712 | def GenerateDeconv_Simt(args): |
| 713 | operations = [] |
| 714 | |
| 715 | layouts = [(LayoutType.TensorNC4HW4, LayoutType.TensorK4RSC4)] |
| 716 | |
| 717 | math_instructions = [ |
| 718 | MathInstruction( |
| 719 | [1, 1, 4], |
| 720 | DataType.s8, |
| 721 | DataType.s8, |
| 722 | DataType.s32, |
| 723 | OpcodeClass.Simt, |
| 724 | MathOperation.multiply_add, |
| 725 | ) |
| 726 | ] |
| 727 | |
| 728 | dst_layouts = [LayoutType.TensorNC4HW4] |
| 729 | |
| 730 | dst_types = [DataType.s8] |
| 731 | |
| 732 | use_special_optimization = SpecialOptimizeDesc.DeconvDoubleUpsampling |
| 733 | |
| 734 | min_cc = 61 |
| 735 | max_cc = 1024 |
| 736 | |
| 737 | for math_inst in math_instructions: |
| 738 | for layout in layouts: |
| 739 | for dst_type, dst_layout in zip(dst_types, dst_layouts): |
| 740 | tile_descriptions = [ |
| 741 | TileDescription( |
| 742 | [32, 128, 32], 2, [1, 2, 1], math_inst, min_cc, max_cc |
| 743 | ), |
| 744 | TileDescription( |
| 745 | [16, 128, 16], 2, [1, 2, 1], math_inst, min_cc, max_cc |
| 746 | ), |
| 747 | TileDescription( |
| 748 | [16, 128, 16], 1, [1, 1, 1], math_inst, min_cc, max_cc |
| 749 | ), |
| 750 | TileDescription( |
| 751 | [16, 64, 8], 2, [1, 1, 1], math_inst, min_cc, max_cc |
| 752 | ), |
| 753 | ] |
| 754 | operations += GenerateConv2d( |
| 755 | ConvType.Convolution, |
| 756 | ConvKind.Dgrad, |
| 757 | tile_descriptions, |
| 758 | layout[0], |
| 759 | layout[1], |
| 760 | dst_layout, |
| 761 | dst_type, |
| 762 | min_cc, |
| 763 | 32, |
| 764 | 32, |
| 765 | 32, |
| 766 | use_special_optimization, |
| 767 | ) |
| 768 | return operations |
| 769 |
no test coverage detected