brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 82ec924 Raw
60 lines · plain
1// RUN: mlir-opt %s -split-input-file -verify-diagnostics2 3func.func @ins_1_index_outs_none_results_1_index(%arg0 : index) -> index {4  %0 = test.destination_style_op ins(%arg0 : index) -> index5  func.return %0 : index6}7 8// -----9 10func.func @ins_1_index_outs_1_tensor_results_1_index(%arg0 : index, %arg1 : tensor<2x2xf32>) -> index {11  // expected-error @+1 {{op expected the number of tensor results (0) to be equal to the number of output tensors (1)}}12  %0 = test.destination_style_op ins(%arg0 : index) outs(%arg1 : tensor<2x2xf32>) -> index13  func.return %0 : index14}15 16// -----17 18func.func @ins_1_tensor_outs_none_results_1_index(%arg0 :tensor<2x2xf32>) -> index {19  %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) -> index20  func.return %0 : index21}22 23// -----24 25func.func @ins_1_tensor_outs_1_tensor_results_1_index(%arg0 :tensor<2x2xf32>, %arg1 : tensor<2x2xf32>) -> index {26  // expected-error @+1 {{op expected the number of tensor results (0) to be equal to the number of output tensors (1)}}27  %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) outs(%arg1 : tensor<2x2xf32>) -> index28  func.return %0 : index29}30 31// -----32 33func.func @ins_1_index_outs_none_results_1_tensor(%arg0 : index) -> tensor<2x2xf32> {34  // expected-error @+1 {{op expected the number of tensor results (1) to be equal to the number of output tensors (0)}}35  %0 = test.destination_style_op ins(%arg0 : index) -> tensor<2x2xf32>36  func.return %0 : tensor<2x2xf32>37}38 39// -----40 41func.func @ins_1_index_outs_1_tensor_results_1_tensor(%arg0 : index, %arg1 : tensor<2x2xf32>) -> tensor<2x2xf32> {42  %0 = test.destination_style_op ins(%arg0 : index) outs(%arg1 : tensor<2x2xf32>) -> tensor<2x2xf32>43  func.return %0 : tensor<2x2xf32>44}45 46// -----47 48func.func @ins_1_tensor_outs_none_results_1_tensor(%arg0 :tensor<2x2xf32>) -> tensor<2x2xf32> {49  // expected-error @+1 {{op expected the number of tensor results (1) to be equal to the number of output tensors (0)}}50  %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) -> tensor<2x2xf32>51  func.return %0 : tensor<2x2xf32>52}53 54// -----55 56func.func @ins_1_tensor_outs_1_tensor_results_1_tensor(%arg0 :tensor<2x2xf32>, %arg1 : tensor<2x2xf32>) -> tensor<2x2xf32> {57  %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) outs(%arg1 : tensor<2x2xf32>) -> tensor<2x2xf32>58  func.return %0 : tensor<2x2xf32>59}60