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 17package { 18 default_applicable_licenses: ["packages_modules_NeuralNetworks_license"], 19} 20 21// Added automatically by a large-scale-change that took the approach of 22// 'apply every license found to every target'. While this makes sure we respect 23// every license restriction, it may not be entirely correct. 24// 25// e.g. GPL in an MIT project might only apply to the contrib/ directory. 26// 27// Please consider splitting the single license below into multiple licenses, 28// taking care not to lose any license_kind information, and overriding the 29// default license using the 'licenses: [...]' property on targets as needed. 30// 31// For unused files, consider creating a 'fileGroup' with "//visibility:private" 32// to attach the license to, and including a comment whether the files may be 33// used in the current project. 34// See: http://go/android-license-faq 35license { 36 name: "packages_modules_NeuralNetworks_license", 37 visibility: [":__subpackages__"], 38 license_kinds: [ 39 "SPDX-license-identifier-Apache-2.0", 40 "SPDX-license-identifier-Artistic", 41 "SPDX-license-identifier-BSD", 42 "SPDX-license-identifier-MPL", 43 "SPDX-license-identifier-MPL-2.0", 44 ], 45 // large-scale-change unable to identify any license_text files 46} 47 48cc_defaults { 49 name: "neuralnetworks_float16", 50 arch: { 51 x86: { 52 cflags: [ "-D_Float16=__fp16", 53 "-Xclang", "-fnative-half-type", 54 "-Xclang", "-fallow-half-arguments-and-returns" ], 55 }, 56 x86_64: { 57 cflags: [ "-D_Float16=__fp16", 58 "-Xclang", "-fnative-half-type", 59 "-Xclang", "-fallow-half-arguments-and-returns" ], 60 }, 61 }, 62} 63 64cc_defaults { 65 name: "neuralnetworks_defaults", 66 defaults: ["neuralnetworks_float16"], 67 cflags: [ 68 "-O3", 69 "-Wall", 70 "-Werror", 71 "-Wextra", 72 ], 73 arch: { 74 x86: { 75 avx2: { 76 cflags: [ 77 "-mavx2", 78 "-mfma", 79 ], 80 }, 81 }, 82 x86_64: { 83 avx2: { 84 cflags: [ 85 "-mavx2", 86 "-mfma", 87 ], 88 }, 89 }, 90 }, 91 product_variables: { 92 debuggable: { // eng and userdebug builds 93 cflags: ["-DNN_DEBUGGABLE"], 94 }, 95 }, 96} 97