Closed huningxin closed 8 months ago
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.
It is widely supported by ML frameworks, such as
tf.math.sqrt
torch.sqrt
Sqrt
The dedicated square root operator is widely available in native ML APIs / libs, e.g.,
xnn_define_square_root
DML_ELEMENT_WISE_SQRT_OPERATOR_DESC
squareRootWithTensor
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.
pow(x, 0.5)
/cc @wacky6
Motivations include:
Note any backends lacking a dedicated square root can still trivially achieve it via the fallback pow(x, 0.5).
This can be closed off c/o PR #478, correct?
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
tf.math.sqrt
.torch.sqrt
.Sqrt
.Cross-platform implementability
The dedicated square root operator is widely available in native ML APIs / libs, e.g.,
xnn_define_square_root
DML_ELEMENT_WISE_SQRT_OPERATOR_DESC
squareRootWithTensor
.Other references
Currently the Chromium CL-4615724 maps
pow(x, 0.5)
toxnn_define_square_root
for WebNN XNNPACK backend. It could be exposed via the dedicated square root operator when WebNN spec supports it./cc @wacky6