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

Method test_device2

tests/python/sparse_tensor.py:105–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103 print(st)
104
105 def test_device2(self):
106 print(f"{self.__class__.__name__}: test_device2 SparseTensor")
107 if not is_cuda_available():
108 return
109
110 coordinates = np.random.rand(8192,3) * 200
111 quant_coordinates, quant_features = sparse_quantize(coordinates, coordinates)
112 bcoords, bfeats = sparse_collate([quant_coordinates], [quant_features])
113 bcoords, bfeats = bcoords.cuda(), bfeats.cuda()
114 print(bcoords, bfeats)
115 SparseTensor(bfeats, bcoords)
116
117 def test_quantization(self):
118 print(f"{self.__class__.__name__}: test_quantization")

Callers

nothing calls this directly

Calls 4

sparse_quantizeFunction · 0.90
sparse_collateFunction · 0.90
SparseTensorClass · 0.90
is_cuda_availableFunction · 0.85

Tested by

no test coverage detected