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

Method MakeZeroPoints

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

Source from the content-addressed store, hash-verified

1502
1503template <typename LhsScalar, typename RhsScalar, typename SpecType>
1504void TestSet<LhsScalar, RhsScalar, SpecType>::MakeZeroPoints() {
1505 RUY_CHECK(life_stage == LifeStage::kInitial);
1506 if (!use_specified_zero_points) {
1507 MakeRandomScalar(RandomRange::kReasonableSrcZeroPoint, &lhs_zero_point);
1508 MakeRandomScalar(RandomRange::kReasonableSrcZeroPoint, &rhs_zero_point);
1509 // If destination is std::int32_t, no dst_zero_point is necessary.
1510 if (std::is_same<DstScalar, std::int32_t>::value) {
1511 dst_zero_point = 0;
1512 } else {
1513 MakeRandomScalar(RandomRange::kReasonableDstZeroPoint, &dst_zero_point);
1514 }
1515 }
1516 life_stage = LifeStage::kHasZeroPoints;
1517}
1518
1519template <typename LhsScalar, typename RhsScalar, typename SpecType>
1520void TestSet<LhsScalar, RhsScalar, SpecType>::MakeLhsRhs() {

Callers

nothing calls this directly

Calls 1

MakeRandomScalarFunction · 0.85

Tested by

no test coverage detected