CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 04:35:33 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/PaddlePaddle/Paddle.git
etag: W/"4214670c4a8c7a4c968562b66778804d"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Xp3N5gN81v%2Fpr8JY15UUQPzmX7Nlif%2BQO5eJagonPD2FcccMRgwqQCa0Tgu%2BVUUvhhhS6ETl25rilBS8EKs2K4Rxxkt%2Bp9xhYrc2GdtNPa1NuaSM0l3b7KGeBdFYVQEvd3wDMHO8xY%2BMEFQoWVLdWpbdtWIzwiRUkGfGQIkNob%2Bj7Jxlf7GeCGuXBzf5lxliswCnNPxJwRp6gU%2B4d9zkZAcsVP9OUmRk8Q%2FZVZSni4b0Hxb7tb1SPG0abOjzSYGnssl9fOGKB604k1owdzanvg%3D%3D--O3vyHZf4OmE%2BOJfZ--r4EBFrP%2FCot5gtRsUKkJVQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1622571805.1753504533; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 04:35:33 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 04:35:33 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AD7E:2F5ED7:16EE13:22149D:68845B14
Adapt python op converters covered in paddle-3-beta2 for TRT 10 (#69510) · PaddlePaddle/Paddle@25ed804 · GitHub
Copy file name to clipboardExpand all lines: paddle/fluid/framework/new_executor/instruction/tensorrt_engine_instruction.cc
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/converter.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/converter_utils.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/activation.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/attribute.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/common.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/conv.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/creation.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/linalg.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/manipulation.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit 25ed804
authored
Adapt python op converters covered in paddle-3-beta2 for TRT 10 (#69510)
* Adapt `paddle.tensorrt.converter` to TRT 10
This commit includes basic migration to TRT 10 API, and also enable
those converter who are tested with existing unittest to TRT10
For those 2 converter which is NOT included in this commit:
- python/paddle/tensorrt/impls/attribute.py
- python/paddle/tensorrt/impls/common.py
Need to fix these 2 behavior issues in later commit.
* Adapt "pd_op.shape" TRT op converter to TRT10
Although `IShapeLayer` supports shape in int64 since TRT10, some paddle
native op kernel only implements their input shape tensor (if exists)
in int32. Hence, there is a workaround in `trt_shape` to cast the
result of TRT `IShapeLayer` back to int32 to be more compatible with
other paddle op. (see python/paddle/tensorrt/converter_utils.py)
Please remove the workaround when all paddle op supports their shape in
int64.
Also, since `IShapeLayer` return shape in int64 in TRT10, the
"pd_op.shape64" will be seamlessly supported in TRT10 w/o any extra
workaround.
* Fix converter error in TRT10 for interpolation ops
Error detail:
{
(%1) = "pd_op.bilinear_interp" [id:28] (%2, %3, <<NULL VALUE>>, <<NULL VALUE>>) {__l_trt__:true,align_corners:false,align_mode:(Int32)0,data_format:"NCHW",interp_method:"bilinear",out_d:(Int32)-1,out_h:(Int32)12,out_w:(Int32)12,scale:[],stop_gradient:[true]} : (builtin.tensor<-1x3x6x10xf32>, builtin.tensor<2xi32>, <<NULL TYPE>>, <<NULL TYPE>>) -> builtin.tensor<-1x3x12x12xf32>
() = "cf.yield" [id:36] (%1) {} : (builtin.tensor<-1x3x12x12xf32>) ->
}
[TRT] [E] ITensor::getDimensions: Error Code 4: API Usage Error ((Unnamed Layer* 6) [Concatenation]: concat input tensors 0 and 2 have incompatible types Int64 and Int32)
[TRT] [E] IBuilder::buildSerializedNetwork: Error Code 4: API Usage Error ((Unnamed Layer* 6) [Concatenation]: concat input tensors 0 and 2 have incompatible types Int64 and Int32)
The error happened in "python/paddle/tensorrt/impls/common.py" because
IConcatenationLayer requires all input to be same dtype.
The (shape)tensor passed from paddle op will be int32, while the TRT
IShapeLayer supports int64 shape; thereby, cannot be concatenated with
each other.
Here, we call `trt_shape` to get shape tensor whose dtype aligned with
the dtype from paddle op.
* Add int64 in TRT->paddle dtype mapping function
* Fix "test_converter_math" by enable op for TRT 10
test_converter_math can pass unittest with environment with TRT 10.6
* Adapt 3 manipulation converters to TRT 10
- "pd_op.expand"
- "pd_op.expand_as"
- "pd_op.slice"1 parent cd595c6 commit 25ed804Copy full SHA for 25ed804
File tree
Expand file treeCollapse file tree
17 files changed
+91
-49
lines changedFilter options
- paddle/fluid/framework/new_executor/instruction
- python/paddle/tensorrt
- impls
Expand file treeCollapse file tree
17 files changed
+91
-49
lines changedpaddle/fluid/framework/new_executor/instruction/tensorrt_engine_instruction.cc
Copy file name to clipboardExpand all lines: paddle/fluid/framework/new_executor/instruction/tensorrt_engine_instruction.cc+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
236 | 242 |
| |
237 | 243 |
| |
238 | 244 |
| |
|
python/paddle/tensorrt/converter.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/converter.py+3Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
448 | 448 |
| |
449 | 449 |
| |
450 | 450 |
| |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 |
| |
452 | 455 |
| |
453 | 456 |
| |
|
python/paddle/tensorrt/converter_utils.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/converter_utils.py+11-1Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
28 | 30 |
| |
29 | 31 |
| |
30 | 32 |
| |
| |||
243 | 245 |
| |
244 | 246 |
| |
245 | 247 |
| |
246 |
| - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
247 | 256 |
| |
248 | 257 |
| |
| 258 | + | |
249 | 259 |
| |
250 | 260 |
| |
251 | 261 |
| |
|
python/paddle/tensorrt/impls/activation.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/activation.py+11-7Lines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
39 |
| - | |
40 |
| - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
| 59 | + | |
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
82 |
| - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 |
| |
84 | 86 |
| |
85 | 87 |
| |
| |||
92 | 94 |
| |
93 | 95 |
| |
94 | 96 |
| |
95 |
| - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 |
| |
97 | 101 |
| |
98 | 102 |
| |
|
python/paddle/tensorrt/impls/attribute.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/attribute.py+4-5Lines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
18 |
| - | |
| 19 | + | |
19 | 20 |
| |
20 |
| - | |
21 |
| - | |
22 |
| - | |
| 21 | + | |
23 | 22 |
| |
24 | 23 |
| |
25 |
| - | |
| 24 | + | |
26 | 25 |
| |
27 | 26 |
| |
28 | 27 |
| |
|
python/paddle/tensorrt/impls/common.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/common.py+9-5Lines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 |
| |
53 | 55 |
| |
54 | 56 |
| |
| |||
139 | 141 |
| |
140 | 142 |
| |
141 | 143 |
| |
142 |
| - | |
| 144 | + | |
143 | 145 |
| |
144 | 146 |
| |
145 | 147 |
| |
| |||
162 | 164 |
| |
163 | 165 |
| |
164 | 166 |
| |
165 |
| - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
166 | 170 |
| |
167 | 171 |
| |
168 | 172 |
| |
| |||
254 | 258 |
| |
255 | 259 |
| |
256 | 260 |
| |
257 |
| - | |
| 261 | + | |
258 | 262 |
| |
259 | 263 |
| |
260 | 264 |
| |
|
python/paddle/tensorrt/impls/conv.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/conv.py+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
|
python/paddle/tensorrt/impls/creation.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/creation.py+4-2Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
| |||
39 | 41 |
| |
40 | 42 |
| |
41 | 43 |
| |
42 |
| - | |
| 44 | + | |
43 | 45 |
| |
44 | 46 |
| |
45 | 47 |
| |
|
python/paddle/tensorrt/impls/linalg.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/linalg.py+4-2Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 |
| |
66 | 68 |
| |
67 | 69 |
| |
|
python/paddle/tensorrt/impls/manipulation.py
Copy file name to clipboardExpand all lines: python/paddle/tensorrt/impls/manipulation.py+17-11Lines changed: 17 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
90 |
| - | |
| 90 | + | |
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
175 |
| - | |
| 175 | + | |
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
191 |
| - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 |
| |
193 | 197 |
| |
194 | 198 |
| |
| |||
235 | 239 |
| |
236 | 240 |
| |
237 | 241 |
| |
238 |
| - | |
239 |
| - | |
| 242 | + | |
| 243 | + | |
240 | 244 |
| |
241 | 245 |
| |
242 | 246 |
| |
| |||
260 | 264 |
| |
261 | 265 |
| |
262 | 266 |
| |
263 |
| - | |
| 267 | + | |
264 | 268 |
| |
265 | 269 |
| |
266 | 270 |
| |
| |||
282 | 286 |
| |
283 | 287 |
| |
284 | 288 |
| |
285 |
| - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
286 | 292 |
| |
287 | 293 |
| |
288 | 294 |
| |
| |||
328 | 334 |
| |
329 | 335 |
| |
330 | 336 |
| |
331 |
| - | |
| 337 | + | |
332 | 338 |
| |
333 | 339 |
| |
334 | 340 |
| |
335 | 341 |
| |
336 | 342 |
| |
337 | 343 |
| |
338 | 344 |
| |
339 |
| - | |
| 345 | + | |
340 | 346 |
| |
341 | 347 |
| |
342 | 348 |
| |
|
You can’t perform that action at this time.
0 commit comments