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

Method test_device

tests/python/quantization.py:52–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 print(quantized_labels)
51
52 def test_device(self):
53 N = 16575
54 coords = np.random.rand(N, 3) * 100
55
56 # Make duplicates
57 coords[:3] = 0
58 unique_map = sparse_quantize(
59 coords.astype(np.int32), return_maps_only=True, device="cpu"
60 )
61
62 print(len(unique_map))
63 unique_map = sparse_quantize(
64 coords.astype(np.int32), return_maps_only=True, device="cuda"
65 )
66 print(len(unique_map))
67
68 def test_mapping(self):
69 N = 16575

Callers

nothing calls this directly

Calls 1

sparse_quantizeFunction · 0.90

Tested by

no test coverage detected