1// Copyright (C) 2020 The Android Open Source Project 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 15package { 16 default_applicable_licenses: ["external_FP16_license"], 17} 18 19// Added automatically by a large-scale-change 20// See: http://go/android-license-faq 21license { 22 name: "external_FP16_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-MIT", 26 ], 27 license_text: [ 28 "LICENSE", 29 ], 30} 31 32cc_library_headers { 33 name: "fp16_headers", 34 export_include_dirs: ["include"], 35 host_supported: true, 36 vendor_available: true, 37 sdk_version: "current", 38 min_sdk_version: "30", 39 apex_available: [ 40 "//apex_available:platform", 41 "com.android.neuralnetworks", 42 "test_com.android.neuralnetworks", 43 "com.android.extservices", 44 "com.android.adservices", 45 "com.android.ondevicepersonalization", 46 ], 47} 48 49cc_defaults { 50 name: "fp16_tests_default", 51 sdk_version: "current", 52 srcs: [ 53 "test/tables.cc", 54 ], 55 header_libs: [ 56 "fp16_headers", 57 ], 58 stl: "libc++_static", 59 static_libs: [ 60 "libgmock_ndk", 61 ] 62} 63 64cc_test { 65 name: "Fp16AltFromFp32ValueTests", 66 defaults: ["fp16_tests_default"], 67 srcs: [ 68 "test/alt-from-fp32-value.cc", 69 ], 70 test_suites: [ 71 "general-tests", 72 ], 73} 74 75cc_test { 76 name: "Fp16AltToFp32BitsTests", 77 defaults: ["fp16_tests_default"], 78 srcs: [ 79 "test/alt-to-fp32-bits.cc", 80 ], 81 test_suites: [ 82 "general-tests", 83 ], 84} 85 86cc_test { 87 name: "Fp16AltToFp32ValueTests", 88 defaults: ["fp16_tests_default"], 89 srcs: [ 90 "test/alt-to-fp32-value.cc", 91 ], 92 test_suites: [ 93 "general-tests", 94 ], 95} 96 97cc_test { 98 name: "Fp16BitcastsTests", 99 defaults: ["fp16_tests_default"], 100 srcs: [ 101 "test/bitcasts.cc", 102 ], 103 test_suites: [ 104 "general-tests", 105 ], 106} 107 108cc_test { 109 name: "Fp16IEEEFromFp32ValueTests", 110 defaults: ["fp16_tests_default"], 111 srcs: [ 112 "test/ieee-from-fp32-value.cc", 113 ], 114 test_suites: [ 115 "general-tests", 116 ], 117} 118 119cc_test { 120 name: "Fp16IEEEToFp32BitsTests", 121 defaults: ["fp16_tests_default"], 122 srcs: [ 123 "test/ieee-to-fp32-bits.cc", 124 ], 125 test_suites: [ 126 "general-tests", 127 ], 128} 129 130cc_test { 131 name: "Fp16IEEEToFp32ValueTests", 132 defaults: ["fp16_tests_default"], 133 srcs: [ 134 "test/ieee-to-fp32-value.cc", 135 ], 136 test_suites: [ 137 "general-tests", 138 ], 139} 140