Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/Shape/invalid.mlir
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// ----- | // ----- | ||||
// Test that shape function library is defined. | // Test that shape function library is defined. | ||||
// expected-error@+1 {{@fn not found}} | // expected-error@+1 {{@fn not found}} | ||||
module attributes {shape.lib = @fn} { } | module attributes {shape.lib = @fn} { } | ||||
// ----- | |||||
func @fn(%arg: !shape.shape) -> i1 { | |||||
// expected-error@+1 {{required at least 2 input shapes}} | |||||
%0 = shape.is_broadcastable %arg : !shape.shape | |||||
return %0 : i1 | |||||
} | |||||
// ----- | |||||
func @fn(%arg: !shape.shape) -> !shape.witness { | |||||
// expected-error@+1 {{required at least 2 input shapes}} | |||||
%0 = shape.cstr_broadcastable %arg : !shape.shape | |||||
return %0 : !shape.witness | |||||
} | |||||