Skip to content

Commit

Permalink
fix core dump when fallback gather_nd_grad and MemoryAllocateHost (#6…
Browse files Browse the repository at this point in the history
  • Loading branch information
raining-dark authored Jan 25, 2024
1 parent 0f732a5 commit ac1702b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions paddle/phi/api/yaml/backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/backends/custom/custom_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac1702b

Please sign in to comment.