Quantized negation can be performed using higher bits operations.
Minimal bits are picked to perform the operation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
167–170 | why not keeping the same behavior as before, ie, use -args[0]? | |
172–221 | I saw this in the spec assert(in_t == aint8_t || input_zp == 0) // Zero point only for asymmetric int8 assert(in_t == aint8_t || output_zp == 0) // Zero point only for asymmetric int8 should we check if they are int8 or it's already checked in the op verifier? | |
182–184 | How about not using std::abs in the declaration so we can use the variable below (to create zpDiffValue)? |
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
167–170 | I wanted to avoid the signed vs signless problem we have been experiencing recently. Moving to SubIOp avoids this. Likely I will fix this to a proper negate operation once it is plumbed through. | |
172–221 | It should be covered by the verifiers. Also, as the aint_8 and int_8 are only distinguished by the operation attributes, its easier to just check zero point values and perform the necessary math. |
why not keeping the same behavior as before, ie, use -args[0]?