66namespace onnxruntime {
77namespace js {
88
9- #define REG_ELEMENTWISE_KERNEL (OP_TYPE, VERSION, KERNEL_CLASS ) \
10- ONNX_OPERATOR_KERNEL_EX ( \
11- OP_TYPE, \
12- kOnnxDomain , \
13- VERSION, \
14- kJsExecutionProvider , \
15- KernelDefBuilder () \
16- .TypeConstraint(" T" , \
17- {DataTypeImpl::GetTensorType<float >(), \
18- DataTypeImpl::GetTensorType<int32_t >(), \
19- DataTypeImpl::GetTensorType<uint32_t >(), \
20- DataTypeImpl::GetTensorType<bool >()}), \
9+ #define REG_ELEMENTWISE_KERNEL (OP_TYPE, VERSION, KERNEL_CLASS ) \
10+ ONNX_OPERATOR_KERNEL_EX ( \
11+ OP_TYPE, \
12+ kOnnxDomain , \
13+ VERSION, \
14+ kJsExecutionProvider , \
15+ KernelDefBuilder () \
16+ .TypeConstraint(" T" , \
17+ {DataTypeImpl::GetTensorType<float >(), \
18+ DataTypeImpl::GetTensorType<MLFloat16>(), \
19+ DataTypeImpl::GetTensorType<int32_t >(), \
20+ DataTypeImpl::GetTensorType<uint32_t >(), \
21+ DataTypeImpl::GetTensorType<bool >()}), \
2122 KERNEL_CLASS);
2223
2324#define REG_ELEMENTWISE_VERSIONED_KERNEL (OP_TYPE, VERSION_FROM, VERSION_TO, KERNEL_CLASS ) \
@@ -29,6 +30,7 @@ namespace js {
2930 KernelDefBuilder () \
3031 .TypeConstraint(" T" , \
3132 {DataTypeImpl::GetTensorType<float >(), \
33+ DataTypeImpl::GetTensorType<MLFloat16>(), \
3234 DataTypeImpl::GetTensorType<int32_t >(), \
3335 DataTypeImpl::GetTensorType<uint32_t >(), \
3436 DataTypeImpl::GetTensorType<bool >()}), \
0 commit comments