Miao Wang | 0391e51 | 2020-02-10 14:52:24 -0800 | [diff] [blame] | 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 | |
Bob Badour | 79600fa | 2021-02-12 15:52:20 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_FP16_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 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 | |
Miao Wang | 0391e51 | 2020-02-10 14:52:24 -0800 | [diff] [blame] | 32 | cc_library_headers { |
| 33 | name: "fp16_headers", |
| 34 | export_include_dirs: ["include"], |
Ian Hua | 80907cb | 2021-08-12 11:16:47 +0100 | [diff] [blame] | 35 | host_supported: true, |
Miao Wang | 0391e51 | 2020-02-10 14:52:24 -0800 | [diff] [blame] | 36 | vendor_available: true, |
| 37 | sdk_version: "current", |
Ian Hua | 80907cb | 2021-08-12 11:16:47 +0100 | [diff] [blame] | 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 | ], |
Miao Wang | 0391e51 | 2020-02-10 14:52:24 -0800 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | cc_defaults { |
| 48 | name: "fp16_tests_default", |
| 49 | sdk_version: "current", |
| 50 | srcs: [ |
| 51 | "test/tables.cc", |
| 52 | ], |
| 53 | header_libs: [ |
| 54 | "fp16_headers", |
| 55 | ], |
| 56 | stl: "libc++_static", |
| 57 | static_libs: [ |
| 58 | "libgmock_ndk", |
| 59 | ] |
| 60 | } |
| 61 | |
| 62 | cc_test { |
| 63 | name: "Fp16AltFromFp32ValueTests", |
| 64 | defaults: ["fp16_tests_default"], |
| 65 | srcs: [ |
| 66 | "test/alt-from-fp32-value.cc", |
| 67 | ], |
| 68 | test_suites: [ |
| 69 | "general-tests", |
| 70 | ], |
| 71 | } |
| 72 | |
| 73 | cc_test { |
| 74 | name: "Fp16AltToFp32BitsTests", |
| 75 | defaults: ["fp16_tests_default"], |
| 76 | srcs: [ |
| 77 | "test/alt-to-fp32-bits.cc", |
| 78 | ], |
| 79 | test_suites: [ |
| 80 | "general-tests", |
| 81 | ], |
| 82 | } |
| 83 | |
| 84 | cc_test { |
| 85 | name: "Fp16AltToFp32ValueTests", |
| 86 | defaults: ["fp16_tests_default"], |
| 87 | srcs: [ |
| 88 | "test/alt-to-fp32-value.cc", |
| 89 | ], |
| 90 | test_suites: [ |
| 91 | "general-tests", |
| 92 | ], |
| 93 | } |
| 94 | |
| 95 | cc_test { |
| 96 | name: "Fp16BitcastsTests", |
| 97 | defaults: ["fp16_tests_default"], |
| 98 | srcs: [ |
| 99 | "test/bitcasts.cc", |
| 100 | ], |
| 101 | test_suites: [ |
| 102 | "general-tests", |
| 103 | ], |
| 104 | } |
| 105 | |
| 106 | cc_test { |
| 107 | name: "Fp16IEEEFromFp32ValueTests", |
| 108 | defaults: ["fp16_tests_default"], |
| 109 | srcs: [ |
| 110 | "test/ieee-from-fp32-value.cc", |
| 111 | ], |
| 112 | test_suites: [ |
| 113 | "general-tests", |
| 114 | ], |
| 115 | } |
| 116 | |
| 117 | cc_test { |
| 118 | name: "Fp16IEEEToFp32BitsTests", |
| 119 | defaults: ["fp16_tests_default"], |
| 120 | srcs: [ |
| 121 | "test/ieee-to-fp32-bits.cc", |
| 122 | ], |
| 123 | test_suites: [ |
| 124 | "general-tests", |
| 125 | ], |
| 126 | } |
| 127 | |
| 128 | cc_test { |
| 129 | name: "Fp16IEEEToFp32ValueTests", |
| 130 | defaults: ["fp16_tests_default"], |
| 131 | srcs: [ |
| 132 | "test/ieee-to-fp32-value.cc", |
| 133 | ], |
| 134 | test_suites: [ |
| 135 | "general-tests", |
| 136 | ], |
| 137 | } |