Skip to content

Commit

Permalink
CUDA sparsity support (#36413) (#36659)
Browse files Browse the repository at this point in the history
  • Loading branch information
JZZ-NOTE authored Oct 25, 2021
1 parent 8ebee86 commit 6ecfe80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions paddle/fluid/inference/tensorrt/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ void TensorRTEngine::FreezeNetwork() {
infer_engine_.reset(infer_builder_->buildEngineWithConfig(
*network(), *infer_builder_config_));
#else
infer_builder_config_->setFlag(nvinfer1::BuilderFlag::kSPARSE_WEIGHTS);
infer_ptr<nvinfer1::IHostMemory> plan(infer_builder_->buildSerializedNetwork(
*network(), *infer_builder_config_));
infer_ptr<nvinfer1::IRuntime> runtime(createInferRuntime(&logger_));
Expand Down

0 comments on commit 6ecfe80

Please sign in to comment.