WebNN clamp limits the input tensor element-wise within a range specified by the minimum and maximum values. The minimum and maximum values could be specified by MLClampOptions.
This open item was raised by @quidity (Thanks Alex!) in Chromium CL review which is
can min & max be == floats and is that ok or not?
The current Chromium implementation restricts the min value should be less than or equal to the max value. TensorFlow.js also implements this restriction. However, some backends implement more strict restriction that the min value should be less than max value, like XNNPACK.
WebNN spec should clarify the restriction.
/cc @fdwr, for inputs on DirectML .