ops.mlir
691 Bytes
// RUN: mlir-opt -split-input-file %s | FileCheck %s
// CHECK-LABEL: test_index_cast
func @test_index_cast(%arg0 : index) -> i64 {
%0 = index_cast %arg0 : index to i64
return %0 : i64
}
// CHECK-LABEL: test_index_cast_tensor
func @test_index_cast_tensor(%arg0 : tensor<index>) -> tensor<i64> {
%0 = index_cast %arg0 : tensor<index> to tensor<i64>
return %0 : tensor<i64>
}
// CHECK-LABEL: test_index_cast_tensor_reverse
func @test_index_cast_tensor_reverse(%arg0 : tensor<i64>) -> tensor<index> {
%0 = index_cast %arg0 : tensor<i64> to tensor<index>
return %0 : tensor<index>
}
func @assert(%arg : i1) {
assert %arg, "Some message in case this assertion fails."
return
}