Skip to content

Commit 12efcb4

Browse files
committed
Update cpp of pytorch
1 parent 19d92c5 commit 12efcb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pytorch/cpp/points_property.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ Tensor points_property(Tensor points, string property) {
9797
int npt = points_in.info().pt_num();
9898
int channel = points_in.info().channel(ptype);
9999
const float* ptr = points_in.ptr(ptype);
100-
CHECK_NE(ptr, nullptr) << "The specified property does not exist.";
100+
// CHECK_NE(ptr, nullptr) << "The specified property does not exist.";
101+
if (ptr == nullptr) {
102+
return Tensor();
103+
}
101104

102105
Tensor data_out = torch::zeros({npt, channel}, torch::dtype(torch::kFloat32));
103106
float* out_ptr = data_out.data_ptr<float>();

0 commit comments

Comments
 (0)