PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.28k stars 5.61k forks source link

Fix random failure in test_trt_convert_strided_slice #69573

Closed anderson101866 closed 1 day ago

anderson101866 commented 2 days ago

PR Category

Inference

PR Types

Bug fixes

Description

The test will produce several error log like: API Usage Error (Tensor slice_output_data_subgraph_4 has axis 3 with inherently negative length. Proven upper bound is -111894960. Network must have an instance where axis has non-negative length.)

, which is uninitialized memory issue due to TRT10 alias Dims to Dims64, but TRT8 alias Dims to Dims32.

Reproduce

Run unittest test_trt_convert_strided_slice with TRT 10. It'll fail with high probability


這個commit 專注C++ TRT converter的改動,也就是現況正在應用的版本。 過去舊有的代碼,以int32_t寫死初始化的memset大小。造成TRT10介面更動時代碼無法自動適應。會因uninitialized memory造成random issue。

In short,此commit修正兩個潛在的TRT10問題

paddle-bot[bot] commented 2 days ago

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.