Skip to content

Commit ac1702b

Browse files
authored
fix core dump when fallback gather_nd_grad and MemoryAllocateHost (#61067)
1 parent 0f732a5 commit ac1702b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

paddle/phi/api/yaml/backward.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,6 @@
944944
func : gather_nd_grad
945945
composite : gather_nd_grad(x, index, out_grad, x_grad)
946946
no_need_buffer : x
947-
data_transform :
948-
skip_transform : index
949947

950948
- backward_op : gaussian_inplace_grad
951949
forward : gaussian_inplace(Tensor x, float mean=0, float std=1.0, int seed=0) -> Tensor(out)

paddle/phi/backends/custom/custom_device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ class CustomDevice : public DeviceInterface {
383383
void* ptr = nullptr;
384384
const auto device = &devices_pool[dev_id];
385385

386-
if (!pimpl_->unified_memory_allocate) {
386+
if (!pimpl_->host_memory_allocate) {
387387
PADDLE_THROW(phi::errors::Unavailable(
388388
"MemoryAllocateHost is not supported on %s.", Type()));
389389
} else {

0 commit comments

Comments
 (0)