Internal test change for Hexagon
PiperOrigin-RevId: 313696314 Change-Id: Ie52c3bea91156e135524bc376d537610bd046461
This commit is contained in:
parent
865127af8a
commit
988f124ddb
|
@ -23,6 +23,7 @@ limitations under the License.
|
|||
namespace tflite {
|
||||
using testing::ElementsAreArray;
|
||||
|
||||
namespace {
|
||||
void GenerateUniformRandomVector(int size, float min, float max,
|
||||
std::minstd_rand* random_engine,
|
||||
std::vector<float>* result) {
|
||||
|
@ -44,6 +45,7 @@ void GenerateUniformRandomVector(int size, float min, float max,
|
|||
(*result)[i] = min + (max - min) * random_value_scaled_0_1;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class ActivationOpModel : public SingleOpModelWithHexagon {
|
||||
public:
|
||||
|
|
|
@ -20,6 +20,7 @@ limitations under the License.
|
|||
namespace tflite {
|
||||
using testing::ElementsAreArray;
|
||||
|
||||
namespace {
|
||||
void GenerateUniformRandomVector(int size, float min, float max,
|
||||
std::minstd_rand* random_engine,
|
||||
std::vector<float>* result) {
|
||||
|
@ -41,6 +42,7 @@ void GenerateUniformRandomVector(int size, float min, float max,
|
|||
(*result)[i] = min + (max - min) * random_value_scaled_0_1;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class QuantizedConcatenationOpModel : public SingleOpModelWithHexagon {
|
||||
public:
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
"""Rules for generating unit-tests using hexagon delegates."""
|
||||
|
||||
load("//tensorflow/lite:special_rules.bzl", "tflite_hexagon_mobile_test")
|
||||
|
||||
def hexagon_op_tests(
|
||||
srcs = [],
|
||||
deps = []):
|
||||
"""Create separate unit test targets for each test file in 'srcs'.
|
||||
"""Create both monolithic and individual unit test targets for each test file in 'srcs'.
|
||||
|
||||
Args:
|
||||
srcs: list of test files, separate target will be created for each item in the list.
|
||||
|
@ -23,3 +25,17 @@ def hexagon_op_tests(
|
|||
"notap",
|
||||
],
|
||||
)
|
||||
|
||||
all_ops_test_name = "hexagon_op_tests_all"
|
||||
native.cc_test(
|
||||
name = all_ops_test_name,
|
||||
srcs = srcs,
|
||||
deps = deps,
|
||||
linkstatic = 1,
|
||||
tags = [
|
||||
"no_oss",
|
||||
"nobuilder",
|
||||
"notap",
|
||||
],
|
||||
)
|
||||
tflite_hexagon_mobile_test(all_ops_test_name)
|
||||
|
|
|
@ -47,3 +47,7 @@ def if_nnapi(supported, not_supported = [], supported_android = None):
|
|||
clean_dep("//tensorflow:android"): supported_android,
|
||||
"//conditions:default": supported,
|
||||
})
|
||||
|
||||
def tflite_hexagon_mobile_test(name):
|
||||
"""This is a no-op outside of Google."""
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue