diff --git a/tensorflow/compiler/xla/service/hlo_reachability.h b/tensorflow/compiler/xla/service/hlo_reachability.h index 0b68cc27008..1d089333ef0 100644 --- a/tensorflow/compiler/xla/service/hlo_reachability.h +++ b/tensorflow/compiler/xla/service/hlo_reachability.h @@ -148,7 +148,7 @@ class HloReachabilityMap { private: using Word = uint64; - static const size_t kBits = 64; + static constexpr size_t kBits = 64; // Number of bits in the bitvector. size_t size_; diff --git a/tensorflow/compiler/xla/tests/half_test.cc b/tensorflow/compiler/xla/tests/half_test.cc index 74333d66610..566f6559c21 100644 --- a/tensorflow/compiler/xla/tests/half_test.cc +++ b/tensorflow/compiler/xla/tests/half_test.cc @@ -34,7 +34,7 @@ class HalfTestBase : public ClientLibraryTestBase { protected: const ErrorSpec error_spec_{0.001, 0.001}; // Number of elements in the input buffers. - static const int kNumElements = 4; + static constexpr int kNumElements = 4; }; using UnaryBuildFuncTy = std::function;