1/* 2 * Copyright 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17cc_defaults { 18 name: "neuralnetworks_float16", 19 arch: { 20 x86: { 21 cflags: [ "-D_Float16=__fp16", 22 "-Xclang", "-fnative-half-type", 23 "-Xclang", "-fallow-half-arguments-and-returns" ], 24 }, 25 x86_64: { 26 cflags: [ "-D_Float16=__fp16", 27 "-Xclang", "-fnative-half-type", 28 "-Xclang", "-fallow-half-arguments-and-returns" ], 29 }, 30 }, 31} 32 33cc_defaults { 34 name: "neuralnetworks_defaults", 35 defaults: ["neuralnetworks_float16"], 36 cflags: [ 37 "-O3", 38 "-Wall", 39 "-Werror", 40 "-Wextra", 41 ], 42 arch: { 43 x86: { 44 avx2: { 45 cflags: [ 46 "-mavx2", 47 "-mfma", 48 ], 49 }, 50 }, 51 x86_64: { 52 avx2: { 53 cflags: [ 54 "-mavx2", 55 "-mfma", 56 ], 57 }, 58 }, 59 }, 60 product_variables: { 61 debuggable: { // eng and userdebug builds 62 cflags: ["-DNN_DEBUGGABLE"], 63 }, 64 }, 65} 66