Skip to content

Commit

Permalink
add contiguous in grad output
Browse files Browse the repository at this point in the history
  • Loading branch information
CaRoLZhangxy committed Jun 27, 2024
1 parent 17cdcb0 commit d18c432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/op/pt/comm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class Border : public torch::autograd::Function<Border> {
torch::Tensor nlocal_tensor = saved_variables[6];
torch::Tensor nghost_tensor = saved_variables[7];

torch::Tensor d_local_g1_tensor = grad_output[0];
torch::Tensor d_local_g1_tensor = grad_output[0].contiguous();

Check warning on line 200 in source/op/pt/comm.cc

View check run for this annotation

Codecov / codecov/patch

source/op/pt/comm.cc#L200

Added line #L200 was not covered by tests
#ifdef USE_MPI
int mpi_init = 0;
MPI_Initialized(&mpi_init);
Expand Down

0 comments on commit d18c432

Please sign in to comment.