From 6ecfe806d381efd6745ab89f4073d8dc195f809b Mon Sep 17 00:00:00 2001 From: JingZhuangzhuang <75348594+JZZ-NOTE@users.noreply.github.com> Date: Sun, 24 Oct 2021 23:47:32 -0500 Subject: [PATCH] CUDA sparsity support (#36413) (#36659) --- paddle/fluid/inference/tensorrt/engine.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/inference/tensorrt/engine.cc b/paddle/fluid/inference/tensorrt/engine.cc index ef58057dadc..e151ef124a7 100644 --- a/paddle/fluid/inference/tensorrt/engine.cc +++ b/paddle/fluid/inference/tensorrt/engine.cc @@ -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 plan(infer_builder_->buildSerializedNetwork( *network(), *infer_builder_config_)); infer_ptr runtime(createInferRuntime(&logger_)); -- GitLab