diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-17 21:02:37 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-17 21:06:35 -0700 |
commit | 37cf4e0783ad06e6cfc94c98a77a48734190ed48 (patch) | |
tree | 64efa2e7a0c7ee49c319a72c6d3fba29465f1489 /tensorflow/contrib/lite/arena_planner_test.cc | |
parent | 527a5eb1759d682810f8155b9767bcc7984d3b3e (diff) |
Automated rollback of commit ff4945f86e04d403cdf46c19392b2041bc75c2ad
PiperOrigin-RevId: 205022167
Diffstat (limited to 'tensorflow/contrib/lite/arena_planner_test.cc')
-rw-r--r-- | tensorflow/contrib/lite/arena_planner_test.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tensorflow/contrib/lite/arena_planner_test.cc b/tensorflow/contrib/lite/arena_planner_test.cc index 7d7c41289c..1adb426d58 100644 --- a/tensorflow/contrib/lite/arena_planner_test.cc +++ b/tensorflow/contrib/lite/arena_planner_test.cc @@ -24,8 +24,6 @@ limitations under the License. namespace tflite { namespace { -constexpr const int kTensorAlignment = 4; - // A simple op to be used in tests, as syntactic sugar. class TestOp { public: @@ -158,7 +156,7 @@ class ArenaPlannerTest : public ::testing::Test { context_.ReportError = ReportError; planner_.reset(new ArenaPlanner( &context_, std::unique_ptr<GraphInfo>(new TestGraphInfo(graph)), - preserve_inputs, /*preserve intermediates*/ false, kTensorAlignment)); + preserve_inputs, /*preserve intermediates*/ false)); CHECK(planner_->ResetAllocations() == kTfLiteOk); CHECK(planner_->PlanAllocations() == kTfLiteOk); } @@ -180,8 +178,8 @@ class ArenaPlannerTest : public ::testing::Test { const TfLiteTensor& tensor = (*graph_->tensors())[tensor_index]; int64_t offset = GetOffset(tensor_index) + tensor.bytes; // We must make sure the offset is aligned to kDefaultArenaAlignment. - if (offset % kTensorAlignment != 0) { - offset += kTensorAlignment - offset % kTensorAlignment; + if (offset % 4 != 0) { + offset += 4 - offset % 4; } return offset; }; |