From ad239bcab7e780ea4b3cc6714fd6828021338f4e Mon Sep 17 00:00:00 2001 From: Dwayne Robinson Date: Thu, 25 Apr 2024 23:03:07 -0700 Subject: [PATCH] Update gemm to check c data type too --- index.bs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 170e83f9..0bd93e74 100644 --- a/index.bs +++ b/index.bs @@ -2966,10 +2966,9 @@ partial interface MLGraphBuilder { 1. If |options|.{{MLGemmOptions/aTranspose}} is true, then reverse the order of the items in |shapeA|. 1. If |options|.{{MLGemmOptions/bTranspose}} is true, then reverse the order of the items in |shapeB|. 1. If |shapeA|[1] is not equal to |shapeB|[0], then [=exception/throw=] a {{TypeError}}. - 1. If |options|.{{MLGemmOptions/c}} [=map/exists=] and is not [=unidirectionally broadcastable=] to the shape « |shapeA|[0], |shapeB|[1] », then [=exception/throw=] a {{TypeError}}. -
- Type compatibility between |a|, |b| and |options|.{{MLGemmOptions/c}} can be also checked. -
+ 1. If |options|.{{MLGemmOptions/c}} [=map/exists=]: + 1. If it is not [=unidirectionally broadcastable=] to the shape « |shapeA|[0], |shapeB|[1] », then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not equal to |a|'s [=MLOperand/dataType=], then [=exception/throw=] a {{TypeError}}. 1. Let |desc| be a new {{MLOperandDescriptor}}. 1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |shapeA|[0], |shapeB|[1] ». 1. Set |desc|.{{MLOperandDescriptor/dataType}} to |a|'s [=MLOperand/dataType=].