Struct value = {[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]};
# We pass these arguments to functions...下一步是添加对在我们的操作中使用它的支持。
更新现有操作
我们现有的一些操作需要更新以处理StructType。第一步是让ODS框架知道我们的Type,这样我们就可以在操作定义中使用它。...下面是一个简单的示例:
// Provide a definition for the Toy StructType for use in ODS....Struct value = {[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]};
# We pass these arguments to functions...>
%1 = toy.transpose(%0 : tensor2x3xf64>) to tensor2xf64>
%2 = toy.mul %1, %1 : tensor2xf64