Commit 0c9f6a0
committed
Integrate internal changes.
This PR integrates the following internal changes into OSS.
commit c6f9d4b57ae793b08ddf415529a83e2aca6df5ce
Author: Sagar Shelke <[email protected]>
Date: Tue Jun 10 14:27:27 2025 -0700
[Dialect/Plan] Add constant foldable subgraph analysis pass.
This MR adds a generic pass for constant foldable subgraph analysis pass. This pass
implements the following three things,
1. A forward data flow analysis to find constant foldable ops.
2. Use clustering to find constant foldable subgraphs.
3. Outline constant foldable subgraphs to `func.func` with
`plan.constant_foldable` attributes.
Pass option `skipClustering` allows user to extend default pass behavior
and skip certain ops from outlining.
MLIR test cases are added including region ops tests.
commit 5fad6480597ee15bdb4a8c04c033b7ef6beff2d0
Author: Christopher Bate <[email protected]>
Date: Tue Jun 10 19:27:04 2025 +0000
NFC: remove unused functions
commit 7eb853f52525756e399a7fc6fdc4ab25244d6f94
Author: Chris Bate <[email protected]>
Date: Tue Jun 10 12:06:51 2025 -0700
[compiler] Create InferTensorValueRangeInterface
Previously, our TensorValueBoundsAnalysis was only able to analyze values
that were either constant or were produced by the result of `plan.with_values`.
This worked because we rely on `plan.with_values` to link integer range
analysis and the TensorValueBoundsAnalysis. However, after clustering there
can occur edge cases where the `plan.with_values` op is not present.
Furthermore, eventually we would like to avoid creating `plan.with_values`
ops in the first place since they temporarily bloat the IR.
This commit adds a new interface, InferTensorValueRangeInterface, that allows
operations to participate in the TensorValueBoundsAnalysis. The logic
for `plan.with_values` is implemented using the interface, and this change
adds an implementation and test for `stablehlo.convert`. Besides this
new behavior for `stablehlo.convert`, this change is a pure refactor and
no other new behavior is added.
commit d49fe69e08d79db07bf9f801427c97f6bfbdfcda
Author: Christopher Bate <[email protected]>
Date: Fri Jun 6 17:03:45 2025 +0000
NFC: Move `python` under `integrations/python`
Moves the `python` directory under `integrations/python` to better
reflect that, like PJRT, the Python packages are a downstream consumer of
the MLIR-TensorRT compiler/runtime libraries.
commit ef5490368b2235e80bb21a6aca39db43d24f1c47
Author: Sagar Shelke <[email protected]>
Date: Sat Jun 7 14:27:21 2025 -0700
[tensorrt] Implement inliner inferface for TensorRT dialect
This MR implements `DialectInlinerInterface` for the TensorRT dialect.
All ops in TensorRT dialect are pure and thus can be inlined, except `module`,
`call` and `call_alloc`. Upstream `--inline` pass doesn't inline operation with
callop interface (`call` and `call_alloc`) because these operations in TensorRT dialect
are referring to callee in different symbol table comapred to their own.
MLIR valid and invalid test is added.
commit cd56aa6a511e2091fcd86106f20d27ff3673db75
Author: Christopher Bate <[email protected]>
Date: Wed Jun 11 14:26:03 2025 +000
Fix build with BUILD_SHARED_LIBS=ON
The new InferTensorValueRangeInterface was used without correctly
specifying the library dependency the PlanIR and StablehloExtIR
libraries.
GitOrigin-RevId: cd56aa6a511e2091fcd86106f20d27ff3673db751 parent 30f9816 commit 0c9f6a0
File tree
62 files changed
+1836
-356
lines changed- mlir-tensorrt
- build_tools
- docker
- scripts
- compiler
- include/mlir-tensorrt
- Dialect
- Plan
- Analysis
- IR
- Transforms
- StablehloExt/IR
- Interfaces
- lib
- Compiler/TensorRTToExecutable
- Dialect
- Plan
- Analysis
- IR
- Transforms
- StablehloExt/IR
- Interfaces
- test
- Dialect
- Plan
- StableHloExt
- Pipelines/TensorRTClustering
- executor
- include/mlir-executor/Transforms/Clustering
- lib/Transforms/Clustering
- test
- integrations
- python
- bindings
- Compiler
- Runtime
- mlir_tensorrt_compiler
- mlir_tensorrt/compiler
- _mlir_libs
- mlir_tensorrt_runtime
- mlir_tensorrt/runtime
- _mlir_libs
- mlir_tensorrt_tools
- mlir_tensorrt/tools
- python
- tensorrt
- lib/TensorRT/IR
- test
- Dialect/TensorRT
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
62 files changed
+1836
-356
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 2 additions & 85 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 34 | + | |
118 | 35 | | |
119 | 36 | | |
120 | 37 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| 437 | + | |
| 438 | + | |
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
| |||
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
588 | 618 | | |
589 | 619 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
0 commit comments