[][src]Function onednn_sys::dnnl_primitive_attr_set_zero_points

pub unsafe extern "C" fn dnnl_primitive_attr_set_zero_points(
    attr: dnnl_primitive_attr_t,
    arg: c_int,
    count: dnnl_dim_t,
    mask: c_int,
    zero_points: *const i32
) -> dnnl_status_t

Sets primitive attributes zero points for primitive operations for a given memory argument.

@sa dnnl_primitive_attr_set_output_scales

@param attr Primitive attributes. @param arg Parameter argument index as passed to the dnnl_primitive_execute() call. @param count Length of the array of zero points @p zero_points. @param mask Zero point correspondence mask that defines the correspondence between the tensor dimensions and the @p zero_points array. The set i-th bit indicates that a dedicated zero point is used for each index along that dimension. Set the mask to 0 to use a common zero point for the whole output tensor. @param zero_points Constant array of int32_t zero points. If the zero points are known at the time of this call, this array must contain @p count zero points and the following equality must hold: \f[count = \prod\limits_{d \in mask} output.dims[d].\f] If the zero points are not known at the time of the call, this array must contain a single #DNNL_RUNTIME_S32_VAL and the zero points must be passed at execution time as an argument with index #DNNL_ARG_ATTR_ZERO_POINTS. @returns #dnnl_success on success and a status describing the error otherwise.