1# Copyright 2016 The Gemmlowp Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14"""Generates the arm32 headers used by the gemm/gemv lib.""" 15 16import cc_emitter 17import common 18import neon_emitter_64 19import quantized_mul_kernels_common 20 21 22def Main(): 23 """.""" 24 cc = cc_emitter.CCEmitter() 25 common.GenerateHeader(cc, 'gemmlowp_meta_quantized_mul_kernels_arm_64', 26 'GEMMLOWP_NEON_64') 27 28 cc.EmitNamespaceBegin('gemmlowp') 29 cc.EmitNamespaceBegin('meta') 30 cc.EmitNewline() 31 32 shapes = [(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), 33 (2, 1), (2, 2), (2, 3), (2, 4), (3, 1), (3, 2), (3, 3)] 34 35 quantized_mul_kernels_common.GenerateKernels(cc, 36 neon_emitter_64.NeonEmitter64(), 37 shapes) 38 39 cc.EmitNamespaceEnd() 40 cc.EmitNamespaceEnd() 41 cc.EmitNewline() 42 43 common.GenerateFooter(cc, 'Meta gemm for arm64 requires: GEMMLOWP_NEON_64!') 44 45 46if __name__ == '__main__': 47 Main() 48