-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR moves the following internal commits to OSS, **Validate any stride for empty tensors** Empty tensors can have a variety of strides which are all equally meaningless. The updated validation check allows any stride if the tensor has a dimension of size zero. **Exporting APIs for StableHlo PassManager and TRT Executable** This changes breaks compiler.compiler_stablehlo_to_executable into two separate APIs in such a way: exe = compiler.compiler_stablehlo_to_executable(client, module.operation, opts) is changed to pipeline = compiler.StableHloPipeline(client, opts) exe = compiler.getExecutable(pipeline, module.operation) Co-authored-by: Copybara Bot <mlir-tensorrt-devs@exchange.nvidia.com>
- Loading branch information
1 parent
e2e0e2b
commit f8d4fe5
Showing
11 changed files
with
181 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
mlir-tensorrt/tensorrt/test/Target/TensorRT/TRT10/linspace.mlir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %pick-one-gpu tensorrt-opt -split-input-file -pass-pipeline="builtin.module(translate-tensorrt-to-engine)" \ | ||
// RUN: -mlir-elide-elementsattrs-if-larger=32 -tensorrt-builder-opt-level=0 -tensorrt-strongly-typed %s | FileCheck %s | ||
// RUN: %pick-one-gpu tensorrt-opt -split-input-file -pass-pipeline="builtin.module(translate-tensorrt-to-engine)" \ | ||
// RUN: -mlir-elide-elementsattrs-if-larger=32 -tensorrt-builder-opt-level=0 %s | FileCheck %s | ||
|
||
// CHECK-LABEL: @dynamic_nd_iota_3 | ||
// CHECK-SAME: tensorrt.engine | ||
func.func @dynamic_nd_iota_3(%arg0: tensor<2xi32> { | ||
tensorrt.value_bounds = #tensorrt.shape_profile<min=[1, 3], opt=[4, 3], max=[12, 3]>, | ||
tensorrt.host_tensor | ||
}) -> tensor<?x3xi64> { | ||
%cst_f16 = tensorrt.constant dense<0> : tensor<i64> | ||
%cst_f16_0 = tensorrt.constant dense<[0, 1]> : tensor<2xi64> | ||
%0 = tensorrt.linspace[%cst_f16 : tensor<i64>] [%arg0 : tensor<2xi32>] [%cst_f16_0 : tensor<2xi64>] : tensor<?x3xi64> | ||
return %0 : tensor<?x3xi64> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters