FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

使用TRT对gpu有要求吗?除了版本

Open GuoZhiyong opened this issue 3 years ago • 3 comments

采用Nvidia T600

Wed Nov 16 10:32:04 2022 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 530.04 Driver Version: 530.04 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA T600 WDDM | 00000000:01:00.0 On | N/A | | 38% 45C P5 N/A / 41W | 3652MiB / 4096MiB | 21% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

按要求配置python的运行环境 0.6.0,后端使用trt,提示如下错误,似乎是内存或参数错误。 请问有什么需要注意的吗?

[WARN][Paddle2ONNX] [multiclass_nms3: multiclass_nms3_0.tmp_1] Paramter nms_top_k:10000 is exceed limit in TensorRT BatchedNMS plugin, will force to 4096. [WARNING] fastdeploy/backends/tensorrt/trt_backend.cc(616)::fastdeploy::TrtBackend::CreateTrtEngineFromOnnx Cannot build engine right now, because there's dynamic input shape exists, list as below, [WARNING] fastdeploy/backends/tensorrt/trt_backend.cc(620)::fastdeploy::TrtBackend::CreateTrtEngineFromOnnx Input 0: TensorInfo(name: image, shape: [-1, 3, 640, 640], dtype: FDDataType::FP32) [WARNING] fastdeploy/backends/tensorrt/trt_backend.cc(620)::fastdeploy::TrtBackend::CreateTrtEngineFromOnnx Input 1: TensorInfo(name: scale_factor, shape: [-1, 2], dtype: FDDataType::FP32) [WARNING] fastdeploy/backends/tensorrt/trt_backend.cc(622)::fastdeploy::TrtBackend::CreateTrtEngineFromOnnx FastDeploy will build the engine while inference with input data, and will also collect the input shape range information. You should be noticed that FastDeploy will rebuild the engine while new input shape is out of the collected shape range, this may bring some time consuming problem, refer https://github.com/PaddlePaddle/FastDeploy/blob/develop/docs/en/faq/tensorrt_tricks.md for more details. [INFO] fastdeploy/runtime.cc(487)::fastdeploy::Runtime::Init Runtime initialized with Backend::TRT in Device::GPU. [WARNING] fastdeploy/backends/tensorrt/utils.cc(40)::fastdeploy::ShapeRangeInfo::Update [New Shape Out of Range] input name: image, shape: [1, 3, 640, 640], The shape range before: min_shape=[-1, 3, 640, 640], max_shape=[-1, 3, 640, 640]. [WARNING] fastdeploy/backends/tensorrt/utils.cc(52)::fastdeploy::ShapeRangeInfo::Update [New Shape Out of Range] The updated shape range now: min_shape=[1, 3, 640, 640], max_shape=[1, 3, 640, 640]. [WARNING] fastdeploy/backends/tensorrt/utils.cc(40)::fastdeploy::ShapeRangeInfo::Update [New Shape Out of Range] input name: scale_factor, shape: [1, 2], The shape range before: min_shape=[-1, 2], max_shape=[-1, 2]. [WARNING] fastdeploy/backends/tensorrt/utils.cc(52)::fastdeploy::ShapeRangeInfo::Update [New Shape Out of Range] The updated shape range now: min_shape=[1, 2], max_shape=[1, 2].[WARNING] fastdeploy/backends/tensorrt/trt_backend.cc(278)::fastdeploy::TrtBackend::Infer TensorRT engine will be rebuilt once shape range information changed, this may take lots of time, you can set a proper shape range before loading model to avoid rebuilding process. refer https://github.com/PaddlePaddle/FastDeploy/blob/develop/docs/en/faq/tensorrt_tricks.md for more details. [INFO] fastdeploy/backends/tensorrt/trt_backend.cc(466)::fastdeploy::TrtBackend::BuildTrtEngine Start to building TensorRT Engine... [ERROR] fastdeploy/backends/tensorrt/trt_backend.cc(238)::fastdeploy::FDTrtLogger::log 1: [virtualMemoryBuffer.cpp::nvinfer1::StdVirtualMemoryBufferImpl::resizePhysical::131] Error Code 1: Cuda Driver (invalid argument) [ERROR] fastdeploy/backends/tensorrt/trt_backend.cc(238)::fastdeploy::FDTrtLogger::log 2: [globWriter.cpp::nvinfer1::builder::HybridGlobWriter::HybridGlobWriter::383] Error Code 2: OutOfMemory (no further information) [ERROR] fastdeploy/backends/tensorrt/trt_backend.cc(238)::fastdeploy::FDTrtLogger::log 2: [builder.cpp::nvinfer1::builder::Builder::buildSerializedNetwork::636] Error Code 2: Internal Error (Assertion engine != nullptr failed. ) [ERROR] fastdeploy/backends/tensorrt/trt_backend.cc(529)::fastdeploy::TrtBackend::BuildTrtEngine Failed to call buildSerializedNetwork(). [ERROR] fastdeploy/backends/tensorrt/trt_backend.cc(369)::fastdeploy::TrtBackend::SetInputs TRTBackend SetInputs not find name:image

GuoZhiyong avatar Nov 16 '22 02:11 GuoZhiyong

环境cuda版本和cudnn版本分别是多少呢

jiangjiajun avatar Nov 16 '22 02:11 jiangjiajun

环境cuda版本和cudnn版本分别是多少呢

cuda 11.2 cudnn 8.6.0.163

感觉是我的T600 4G显存有些小。可能有memory limit的配置或限制

GuoZhiyong avatar Nov 17 '22 04:11 GuoZhiyong

如果只有4G,建议跑一些小的模型

jiangjiajun avatar Nov 17 '22 06:11 jiangjiajun

环境cuda版本和cudnn版本分别是多少呢

cuda 11.2 cudnn 8.6.0.163

感觉是我的T600 4G显存有些小。可能有memory limit的配置或限制

最后成功了吗

GeT-RiGhTTT avatar May 08 '23 08:05 GeT-RiGhTTT