MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / test_pcd2

Method test_pcd2

tests/cpp/kernel_region_gpu_test.py:104–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102 print(f"{num}\t{num_kernels}\t{t}")
103
104 def test_pcd2(self):
105 coords, colors, pcd = load_file("1.ply")
106 kernel_size = torch.IntTensor([3, 3, 3])
107 for occupancy in [50]:
108 for batch_size in [1, 5, 10, 20, 40]:
109 for voxel_size in [0.05, 0.035, 0.02]:
110 min_time = 100000
111 dcoords = torch.from_numpy(np.floor(coords / voxel_size)).int()
112 bcoords = batched_coordinates(
113 [dcoords for i in range(batch_size)]
114 ).to(0)
115 for i in range(10):
116 kernel_map, num, t = MinkowskiEngineTest._C.kernel_map_test(
117 bcoords, bcoords, kernel_size, occupancy, 128,
118 )
119 min_time = min(t, min_time)
120
121 num_kernels = np.sum([len(a) for a in kernel_map[0]])
122 print(
123 f"{occupancy}\t{batch_size}\t{voxel_size}\t{num}\t{num_kernels}\t{min_time}"
124 )

Callers

nothing calls this directly

Calls 2

load_fileFunction · 0.90
batched_coordinatesFunction · 0.90

Tested by

no test coverage detected