Fix random failure in test_trt_convert_strided_slice #69573
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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問題