mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
[MLIR] Fix tensor shapes in Toy chapter 1
In Toy tutorial chapter 1, multiply_transpose() is called with b<2, 3> and c<3, 2> when both parameters should have the same shape. This commit fixes this by instead using c and d as parameters and fix a comment typo where c and d are mentioned to have shape <2, 2> when they actually have shape <3, 2>. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D142622
This commit is contained in:
@@ -59,7 +59,7 @@ def main() {
|
||||
|
||||
# A new call with <3, 2> (instead of <2, 3>) for both dimensions will
|
||||
# trigger another specialization of `multiply_transpose`.
|
||||
var e = multiply_transpose(b, c);
|
||||
var e = multiply_transpose(c, d);
|
||||
|
||||
# Finally, calling into `multiply_transpose` with incompatible shape will
|
||||
# trigger a shape inference error.
|
||||
@@ -106,8 +106,8 @@ Module:
|
||||
]
|
||||
VarDecl e<> @test/Examples/Toy/Ch1/ast.toy:25:3
|
||||
Call 'multiply_transpose' [ @test/Examples/Toy/Ch1/ast.toy:25:11
|
||||
var: b @test/Examples/Toy/Ch1/ast.toy:25:30
|
||||
var: c @test/Examples/Toy/Ch1/ast.toy:25:33
|
||||
var: c @test/Examples/Toy/Ch1/ast.toy:25:30
|
||||
var: d @test/Examples/Toy/Ch1/ast.toy:25:33
|
||||
]
|
||||
VarDecl f<> @test/Examples/Toy/Ch1/ast.toy:28:3
|
||||
Call 'multiply_transpose' [ @test/Examples/Toy/Ch1/ast.toy:28:11
|
||||
|
||||
Reference in New Issue
Block a user