Skip to content

Commit

Permalink
check status of allocate_temp (deepmodeling#2797)
Browse files Browse the repository at this point in the history
It's the same as deepmodeling#2782, but one line was missing in that PR.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Sep 8, 2023
1 parent c6dea0c commit c6829bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/op/prod_env_mat_multi_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1549,8 +1549,11 @@ static int _norm_copy_coord_gpu(OpKernelContext* context,
// Tensor cpy_temp;
TensorShape cpy_shape;
cpy_shape.AddDim(mem_cpy * 3);
context->allocate_temp(DataTypeToEnum<FPTYPE>::value, cpy_shape,
tensor_list + 3);
status = context->allocate_temp(DataTypeToEnum<FPTYPE>::value, cpy_shape,
tensor_list + 3);
if (!status.ok()) {
return false;
}
// Tensor t_temp;
TensorShape t_shape;
t_shape.AddDim(mem_cpy * 2);
Expand Down

0 comments on commit c6829bc

Please sign in to comment.