llvm-project/mlir/test/Examples/Toy/Ch3/scalar.toy

13 lines
397 B
Plaintext
Raw Normal View History

def main() {
var a<2, 2> = 5.5;
print(a);
}
# CHECK-LABEL: func @main() {
# CHECK-NEXT: %0 = "toy.constant"() {value: dense<tensor<1xf64>, [5.500000e+00]>} : () -> !toy<"array<1>">
# CHECK-NEXT: %1 = "toy.reshape"(%0) : (!toy<"array<1>">) -> !toy<"array<2, 2>">
# CHECK-NEXT: "toy.print"(%1) : (!toy<"array<2, 2>">) -> ()
# CHECK-NEXT: "toy.return"() : () -> ()
# CHECK-NEXT: }