提交 9e523ef6 编写于 作者: L liaogang

FIX: order matter in Linux !

上级 2631077c
...@@ -132,10 +132,10 @@ class Tensor { ...@@ -132,10 +132,10 @@ class Tensor {
template <typename T, typename Place> template <typename T, typename Place>
struct PlaceholderImpl : public Placeholder { struct PlaceholderImpl : public Placeholder {
PlaceholderImpl(Place place, size_t size) PlaceholderImpl(Place place, size_t size)
: place_(place), : ptr_(static_cast<T*>(memory::Alloc(place, size)),
size_(size), memory::PODDeleter<T, Place>(place)),
ptr_(static_cast<T*>(memory::Alloc(place, size)), place_(place),
memory::PODDeleter<T, Place>(place)) { size_(size) {
PADDLE_ENFORCE(ptr_ != nullptr, "Insufficient %s memory to allocation.", PADDLE_ENFORCE(ptr_ != nullptr, "Insufficient %s memory to allocation.",
is_cpu_place(place_) ? "CPU" : "GPU"); is_cpu_place(place_) ? "CPU" : "GPU");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册