Skip to content

Commit b2d9c91

Browse files
authored
Merge pull request #1 from reyoung/czy_elemwise
Fix CI test
2 parents f6dee08 + d8921e9 commit b2d9c91

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
@@ -79,7 +79,7 @@ class Tensor {
7979
inline T* mutable_data(DDim dims, platform::Place place);
8080

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

8484
/*! Return the dimensions of the memory block. */
8585
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)