diff --git a/xla/stream_executor/device_description.h b/xla/stream_executor/device_description.h index 313ae5e2dca5e..f6bb2e4a41ad4 100644 --- a/xla/stream_executor/device_description.h +++ b/xla/stream_executor/device_description.h @@ -342,7 +342,7 @@ class DeviceDescription { } // Returns the number of threads per warp/wavefront. - const int64_t &threads_per_warp() const { return threads_per_warp_; } + constexpr int64_t threads_per_warp() const { return threads_per_warp_; } // Returns the limit on the total number of registers per core. const int64_t ®isters_per_core_limit() const {