From 3e91a462d42306521fc9af6038a804a798ebf256 Mon Sep 17 00:00:00 2001 From: raining-dark <2429952130@qq.com> Date: Tue, 23 Jan 2024 19:06:21 +0800 Subject: [PATCH] fix core dump when fallback gather_nd_grad and MemoryAllocateHost --- paddle/phi/api/yaml/backward.yaml | 2 -- paddle/phi/backends/custom/custom_device.cc | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/phi/api/yaml/backward.yaml b/paddle/phi/api/yaml/backward.yaml index 3a87826337465b..af144eb662eade 100644 --- a/paddle/phi/api/yaml/backward.yaml +++ b/paddle/phi/api/yaml/backward.yaml @@ -944,8 +944,6 @@ func : gather_nd_grad composite : gather_nd_grad(x, index, out_grad, x_grad) no_need_buffer : x - data_transform : - skip_transform : index - backward_op : gaussian_inplace_grad forward : gaussian_inplace(Tensor x, float mean=0, float std=1.0, int seed=0) -> Tensor(out) diff --git a/paddle/phi/backends/custom/custom_device.cc b/paddle/phi/backends/custom/custom_device.cc index 48bedd1bd939e4..ddbfc60f19f083 100644 --- a/paddle/phi/backends/custom/custom_device.cc +++ b/paddle/phi/backends/custom/custom_device.cc @@ -383,7 +383,7 @@ class CustomDevice : public DeviceInterface { void* ptr = nullptr; const auto device = &devices_pool[dev_id]; - if (!pimpl_->unified_memory_allocate) { + if (!pimpl_->host_memory_allocate) { PADDLE_THROW(phi::errors::Unavailable( "MemoryAllocateHost is not supported on %s.", Type())); } else {