File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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\n Tenosr holds no memory. Call "
39+ " holder_ should not be null\n Tensor 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\n Tenosr holds no memory. Call "
117+ " holder_ should not be null\n Tensor 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) {
You can’t perform that action at this time.
0 commit comments