[Mlir-commits] [mlir] [mlir][tosa] Add integer type conversion pass (PR #232853)
Jack Frankland
llvmlistbot at llvm.org
Wed Oct 28 05:00:57 PDT 2026
================
@@ -0,0 +1,332 @@
+// REQUIRES: host-byteorder-little-endian
+// RUN: mlir-opt -split-input-file -pass-pipeline='builtin.module(tosa-convert-integer-types-bitwidth{bitwidth-mappings=4:8,48:64})' %s | FileCheck %s --implicit-check-not=i4 --implicit-check-not=unrealized_conversion_cast --implicit-check-not=tosa.cast
+// RUN: mlir-opt -split-input-file -tosa-convert-integer-types-bitwidth='bitwidth-mappings=4:8,48:64' %s | mlir-opt -split-input-file -tosa-convert-integer-types-bitwidth='bitwidth-mappings=4:8,48:64' | FileCheck %s --implicit-check-not=i4 --implicit-check-not=unrealized_conversion_cast --implicit-check-not=tosa.cast
+
+// CHECK-LABEL: func.func @clamp
+func.func @clamp(%arg: tensor<4xi48>) -> tensor<4xi48> {
+ // CHECK: tosa.clamp %{{.*}} min_val(-140737488355328 : i64) max_val(140737488355327 : i64) {test.marker = "keep"} : (tensor<4xi64>) -> tensor<4xi64>
+ %0 = tosa.clamp %arg min_val(-140737488355328 : i48) max_val(140737488355327 : i48) {test.marker = "keep"} : (tensor<4xi48>) -> tensor<4xi48>
----------------
FranklandJack wrote:
What's with the `test.marker` here?
https://github.com/llvm/llvm-project/pull/232853
More information about the Mlir-commits
mailing list