-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
Use case and sample models
This op was proposed by @fdwr (Thanks Dwyane!) as a WebNN v2 op in WebML WG Teleconference – 29 June 2023 to support transformer models, such as segment anything model.
Cross-framework support
It is widely supported by ML frameworks, such as
- TensorFlow supports
tf.math.sqrt. - Pytorch supports
torch.sqrt. - ONNX supports
Sqrt.
Cross-platform implementability
The dedicated square root operator is widely available in native ML APIs / libs, e.g.,
- XNNPACK
xnn_define_square_root - DirectML
DML_ELEMENT_WISE_SQRT_OPERATOR_DESC - MPSGraph
squareRootWithTensor.
Other references
Currently the Chromium CL-4615724 maps pow(x, 0.5) to xnn_define_square_root for WebNN XNNPACK backend. It could be exposed via the dedicated square root operator when WebNN spec supports it.
/cc @wacky6
fdwr and anssiko