MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeResultPaths

Method MakeResultPaths

tensorflow/lite/experimental/ruy/test.h:1655–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1653
1654template <typename LhsScalar, typename RhsScalar, typename SpecType>
1655void TestSet<LhsScalar, RhsScalar, SpecType>::MakeResultPaths() {
1656 RUY_CHECK(life_stage == LifeStage::kHasOtherParams);
1657
1658 Path paths_bitfield = static_cast<Path>(GetHexIntEnvVarOrZero("PATHS"));
1659
1660 if (paths_bitfield == Path::kNone) {
1661 // Use a dummy Context just to perform the resolution of specific runtime
1662 // enabled paths.
1663 Context context;
1664 paths_bitfield = context.GetRuntimeEnabledPaths();
1665 }
1666
1667 // Trim bits that don't correspond to a compiled path,
1668 // to allow specifying e.g. ffff to mean 'all paths' regardless of whether all
1669 // those bits exist as actual paths.
1670 paths_bitfield = paths_bitfield & kAllPaths;
1671 RUY_CHECK(paths_bitfield != Path::kNone);
1672 paths = PathsBitfieldAsVector(paths_bitfield);
1673
1674#ifdef RUY_TEST_EXTERNAL_PATHS
1675
1676 using TestSetType = TestSet<LhsScalar, RhsScalar, SpecType>;
1677
1678 if (!getenv("NOEXT")) {
1679 if (SupportsGemmlowp<TestSetType>::kValue) {
1680#ifdef GEMMLOWP_SSE4
1681 const bool gemmlowp_supported = !spec.multiplier_fixedpoint_perchannel;
1682#else
1683 const bool gemmlowp_supported = true;
1684#endif
1685 if (gemmlowp_supported) {
1686 external_paths.push_back(ExternalPath::kGemmlowp);
1687 }
1688 }
1689 if (UsesSingleScalarType<TestSetType>::kValue &&
1690 std::is_floating_point<AccumScalar>::value) {
1691 external_paths.push_back(ExternalPath::kEigen);
1692 if (layout_style == LayoutStyle::kPackedLinear) {
1693 external_paths.push_back(ExternalPath::kEigenTensor);
1694 }
1695// We link against a generic BLAS target that only maps to OpenBLAS on specific
1696// architectures.
1697#if RUY_PLATFORM(ARM_32) || RUY_PLATFORM(ARM_64)
1698 // OpenBLAS multi-threading is disabled, so avoid mixing single-threaded
1699 // and multi-threaded benchmark results.
1700 if (max_num_threads == 1) {
1701 external_paths.push_back(ExternalPath::kOpenBlas);
1702 }
1703#endif
1704 }
1705 }
1706
1707#endif // RUY_TEST_EXTERNAL_PATHS
1708
1709 for (Path path : paths) {
1710 for (Tuning tuning : EnumerateTuningsForPath(path, benchmark)) {
1711 results.emplace_back(new TestResultType);
1712 TestResultType& result = *results.back();

Callers

nothing calls this directly

Calls 8

GetHexIntEnvVarOrZeroFunction · 0.85
PathsBitfieldAsVectorFunction · 0.85
EnumerateTuningsForPathFunction · 0.85
MakeRandomFunction · 0.85
push_backMethod · 0.45
emplace_backMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected