Skip to content

Commit

Permalink
Merge pull request #1 from reyoung/czy_elemwise
Browse files Browse the repository at this point in the history
Fix CI test
  • Loading branch information
zchen0211 committed Sep 13, 2017
2 parents f6dee08 + d8921e9 commit b2d9c91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paddle/framework/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Tensor {
inline T* mutable_data(DDim dims, platform::Place place);

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

/*! Return the dimensions of the memory block. */
inline const DDim& dims() const;
Expand Down
4 changes: 2 additions & 2 deletions paddle/framework/tensor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST(Tensor, DataAssert) {
} catch (paddle::platform::EnforceNotMet err) {
caught = true;
std::string msg =
"holder_ should not be null\nTenosr holds no memory. Call "
"holder_ should not be null\nTensor holds no memory. Call "
"Tensor::mutable_data first.";
const char* what = err.what();
for (size_t i = 0; i < msg.length(); ++i) {
Expand Down Expand Up @@ -114,7 +114,7 @@ TEST(Tensor, ShareDataWith) {
} catch (paddle::platform::EnforceNotMet err) {
caught = true;
std::string msg =
"holder_ should not be null\nTenosr holds no memory. Call "
"holder_ should not be null\nTensor holds no memory. Call "
"Tensor::mutable_data first.";
const char* what = err.what();
for (size_t i = 0; i < msg.length(); ++i) {
Expand Down

0 comments on commit b2d9c91

Please sign in to comment.