Skip to content

Commit

Permalink
FIX: order matter in Linux !
Browse files Browse the repository at this point in the history
  • Loading branch information
gangliao committed Jul 28, 2017
1 parent 2631077 commit 9e523ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paddle/framework/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class Tensor {
template <typename T, typename Place>
struct PlaceholderImpl : public Placeholder {
PlaceholderImpl(Place place, size_t size)
: place_(place),
size_(size),
ptr_(static_cast<T*>(memory::Alloc(place, size)),
memory::PODDeleter<T, Place>(place)) {
: ptr_(static_cast<T*>(memory::Alloc(place, size)),
memory::PODDeleter<T, Place>(place)),
place_(place),
size_(size) {
PADDLE_ENFORCE(ptr_ != nullptr, "Insufficient %s memory to allocation.",
is_cpu_place(place_) ? "CPU" : "GPU");
}
Expand Down

0 comments on commit 9e523ef

Please sign in to comment.