diff --git a/paddle/pten/api/lib/utils/storage.h b/paddle/pten/api/lib/utils/storage.h index 132ffe165eec633a28bc8c2b2a036e9432100047..793ddfcee3a63e7c8665b338bbc6d427feef516a 100644 --- a/paddle/pten/api/lib/utils/storage.h +++ b/paddle/pten/api/lib/utils/storage.h @@ -84,6 +84,7 @@ class SharedStorage : public pten::Storage { void Clear() override { data_ = nullptr; size_ = 0; + offset_ = 0; } size_t size() const noexcept override { return size_; }