MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / setSparseWeights

Function setSparseWeights

samples/common/sampleUtils.cpp:315–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314template <typename L>
315void setSparseWeights(L& l, int32_t k, int32_t trs, std::vector<int8_t>& sparseWeights)
316{
317 auto weights = l.getKernelWeights();
318 sparsify(weights, k, trs, sparseWeights);
319 weights.values = sparseWeights.data();
320 l.setKernelWeights(weights);
321}
322
323// Explicit instantiation
324template void setSparseWeights<IConvolutionLayer>(

Callers 1

sparsifyFunction · 0.85

Calls 4

sparsifyFunction · 0.85
getKernelWeightsMethod · 0.45
dataMethod · 0.45
setKernelWeightsMethod · 0.45

Tested by

no test coverage detected