diff --git a/third_party/xla_client/pjrt_computation_client.h b/third_party/xla_client/pjrt_computation_client.h index 7a9fb951ee71..c4857791b0f1 100644 --- a/third_party/xla_client/pjrt_computation_client.h +++ b/third_party/xla_client/pjrt_computation_client.h @@ -131,6 +131,7 @@ class PjRtComputationClient : public ComputationClient { : Data(std::move(device), std::move(device_shape)), buffer(buffer) {} OpaqueHandle GetOpaqueHandle() override { + XLA_CHECK(HasValue()); return reinterpret_cast(buffer.get()); }; void Assign(const Data& data) override;