pub struct QuantizePerTensorBackwardArgs<'a, TIn: Element, TOut: IntElement> {
pub input: TensorRef<'a, TIn, 1>,
pub scale: <TIn as Element>::Scalar,
pub zero_point: i32,
pub d_output: TensorRef<'a, TIn, 1>,
pub d_input: TensorMut<'a, TIn, 1>,
pub _phantom: PhantomData<TOut>,
}Expand description
Args bundle for a quantize_per_tensor backward launch.
Fields§
§input: TensorRef<'a, TIn, 1>Saved FW input [numel] in FP — required for mask recomputation.
scale: <TIn as Element>::ScalarScalar scale (FP, same value used in FW).
zero_point: i32Scalar zero point (same value used in FW).
d_output: TensorRef<'a, TIn, 1>Upstream gradient [numel] in FP.
d_input: TensorMut<'a, TIn, 1>Output [numel] in FP — same dtype as d_output.
_phantom: PhantomData<TOut>Phantom for the int-output dtype carried by the plan type
parameter (so the BW plan has the same <TIn, TOut> shape as the
FW plan, even though the BW kernel doesn’t consume an int operand).
Auto Trait Implementations§
impl<'a, TIn, TOut> !UnwindSafe for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> Freeze for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> RefUnwindSafe for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> Send for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> Sync for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> Unpin for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
impl<'a, TIn, TOut> UnsafeUnpin for QuantizePerTensorBackwardArgs<'a, TIn, TOut>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more