[ONNX] [#8838] QLinearLeakyRelu contrib op #9063
Conversation
|
You hit a known issue with CI's lint that was just fixed, rebase? |
mbrookhart
left a comment
There was a problem hiding this comment.
Minor request for documentation, otherwise looks good, thanks!
| a = _qnn.op.dequantize(inputs[0], a_scale, a_zero_point) | ||
| out = _op.nn.leaky_relu(a, alpha) | ||
| return _qnn.op.quantize(out, y_scale, y_zero_point, out_dtype=dtype) |
There was a problem hiding this comment.
If we're dequantinzing, can you provide a link to ORT doing the same thing? if this is an ORT op and they're running it in int8, I'd prefer to import it in int8 here?f
There was a problem hiding this comment.
Added the ORT op definition from docs
There was a problem hiding this comment.
If alpha is a power of two e.g. 1 / 16 or 1 / 8, then we can implement this via bit shift operations assuming zero can be represented in the quantization scheme. Not making a suggestion or anything, just thought it was an interesting point.
There was a problem hiding this comment.
It would be an interesting point to try out. Here, we wanted to reuse the existing function.
c98c55b to
c6c5b76
Compare
|
@gayatripk1 can you jostle CI via an empty commit e.g. |
Done |
|
@gayatripk1 think you need to jostle ci once more. Ci is a little flaky :/ |
Done |
|
thanks @gayatripk1 |
* [ONNX] QLinearLeakyRelu contrib op * Add comment * jostle ci * jostle ci
* [ONNX] QLinearLeakyRelu contrib op * Add comment * jostle ci * jostle ci
This PR implements com.microsoft.QLinearLeakyRelu. This is implemented as dequantize->LeakyRelu->quantize for now.