Skip to content

Commit 717493c

Browse files
kylevedderfacebook-github-bot
authored andcommitted
Fixed last dimension size check so that it doesn't trivially pass. (facebookresearch#1815)
Summary: Currently, it checks that the `2`th dimension of `p2` is the same size as the `2`th dimension of `p2` instead of `p1`. Pull Request resolved: facebookresearch#1815 Reviewed By: MichaelRamamonjisoa Differential Revision: D58586966 Pulled By: bottler fbshipit-source-id: d4f723fa264f90fe368c10825c1acdfdc4c406dc
1 parent 302da69 commit 717493c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch3d/csrc/knn/knn.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ std::tuple<at::Tensor, at::Tensor> KNearestNeighborIdxCuda(
338338

339339
TORCH_CHECK((norm == 1) || (norm == 2), "Norm must be 1 or 2.");
340340

341-
TORCH_CHECK(p2.size(2) == D, "Point sets must have the same last dimension");
341+
TORCH_CHECK(p1.size(2) == D, "Point sets must have the same last dimension");
342342
auto long_dtype = lengths1.options().dtype(at::kLong);
343343
auto idxs = at::zeros({N, P1, K}, long_dtype);
344344
auto dists = at::zeros({N, P1, K}, p1.options());

0 commit comments

Comments
 (0)