Skip to content

Commit d8921e9

Browse files
committed
Fix CI test
1 parent adfef24 commit d8921e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paddle/framework/tensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Tensor {
7676
inline T* mutable_data(DDim dims, platform::Place place);
7777

7878
/*! Size of a single element in data() */
79-
inline size_t element_size() { return holder_->element_size(); }
79+
inline size_t element_size() const { return holder_->element_size(); }
8080

8181
/*! Return the dimensions of the memory block. */
8282
inline const DDim& dims() const;

paddle/framework/tensor_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ TEST(Tensor, DataAssert) {
3636
} catch (paddle::platform::EnforceNotMet err) {
3737
caught = true;
3838
std::string msg =
39-
"holder_ should not be null\nTenosr holds no memory. Call "
39+
"holder_ should not be null\nTensor holds no memory. Call "
4040
"Tensor::mutable_data first.";
4141
const char* what = err.what();
4242
for (size_t i = 0; i < msg.length(); ++i) {
@@ -114,7 +114,7 @@ TEST(Tensor, ShareDataWith) {
114114
} catch (paddle::platform::EnforceNotMet err) {
115115
caught = true;
116116
std::string msg =
117-
"holder_ should not be null\nTenosr holds no memory. Call "
117+
"holder_ should not be null\nTensor holds no memory. Call "
118118
"Tensor::mutable_data first.";
119119
const char* what = err.what();
120120
for (size_t i = 0; i < msg.length(); ++i) {

0 commit comments

Comments
 (0)