Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/Linalg/invalid.mlir
Show First 20 Lines • Show All 634 Lines • ▼ Show 20 Lines | func @pad_yield_type(%arg0: tensor<?x4xi32>, %arg1: i8) -> tensor<?x9xi32> { | ||||
return %0 : tensor<?x9xi32> | return %0 : tensor<?x9xi32> | ||||
} | } | ||||
// ----- | // ----- | ||||
func @illegal_fill_tensor_no_return(%arg0 : index, %arg1 : index, %arg2 : f32) | func @illegal_fill_tensor_no_return(%arg0 : index, %arg1 : index, %arg2 : f32) | ||||
{ | { | ||||
%0 = linalg.init_tensor [%arg0, %arg1] : tensor<?x?xf32> | %0 = linalg.init_tensor [%arg0, %arg1] : tensor<?x?xf32> | ||||
// expected-error @+1 {{expected fill op with no result value to use memref type}} | // expected-error @+1 {{expected the number of results (0) to be equal to the number of output tensors (1)}} | ||||
linalg.fill(%arg2, %0) : f32, tensor<?x?xf32> | linalg.fill(%arg2, %0) : f32, tensor<?x?xf32> | ||||
} | } | ||||
// ----- | // ----- | ||||
func @illegal_fill_memref_with_return(%arg0 : memref<?x?xf32>, %arg1 : f32) -> memref<?x?xf32> | func @illegal_fill_memref_with_return(%arg0 : memref<?x?xf32>, %arg1 : f32) -> memref<?x?xf32> | ||||
{ | { | ||||
// expected-error @+1 {{unexpected #results > #outputs}} | // expected-error @+1 {{expected the number of results (1) to be equal to the number of output tensors (0)}} | ||||
%0 = linalg.fill(%arg1, %arg0) : f32, memref<?x?xf32> -> memref<?x?xf32> | %0 = linalg.fill(%arg1, %arg0) : f32, memref<?x?xf32> -> memref<?x?xf32> | ||||
return %0 : memref<?x?xf32> | return %0 : memref<?x?xf32> | ||||
} | } | ||||
// ----- | // ----- | ||||
func @illegal_fill_memref_with_tensor_return | func @illegal_fill_memref_with_tensor_return | ||||
(%arg0 : memref<?x?xf32>, %arg1 : f32) -> tensor<?x?xf32> | (%arg0 : memref<?x?xf32>, %arg1 : f32) -> tensor<?x?xf32> | ||||
{ | { | ||||
// expected-error @+1 {{unexpected #results > #outputs}} | // expected-error @+1 {{expected the number of results (1) to be equal to the number of output tensors (0)}} | ||||
%0 = linalg.fill(%arg1, %arg0) : f32, memref<?x?xf32> -> tensor<?x?xf32> | %0 = linalg.fill(%arg1, %arg0) : f32, memref<?x?xf32> -> tensor<?x?xf32> | ||||
return %0 : tensor<?x?xf32> | return %0 : tensor<?x?xf32> | ||||
} | } | ||||
// ----- | // ----- | ||||
func @illegal_fill_tensor_with_memref_return | func @illegal_fill_tensor_with_memref_return | ||||
(%arg0 : tensor<?x?xf32>, %arg1 : f32) -> memref<?x?xf32> | (%arg0 : tensor<?x?xf32>, %arg1 : f32) -> memref<?x?xf32> | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |