Skip to content

Commit 5380709

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1ee7bcc commit 5380709

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

neural_compressor/jax/quantization/layers_static.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ def convert(self):
442442
if self._is_int8:
443443
self.a_zero_point.assign(a_zero_point)
444444

445-
w_scale, w_zero_point = get_q_params(self.kernel, self.weight_dtype, self.compute_dtype, asymmetric=self._is_int8)
445+
w_scale, w_zero_point = get_q_params(
446+
self.kernel, self.weight_dtype, self.compute_dtype, asymmetric=self._is_int8
447+
)
446448
self.w_scale.assign(w_scale)
447449
if self._is_int8:
448450
self.w_zero_point.assign(w_zero_point)
@@ -1086,7 +1088,9 @@ def prepare(cls, orig, weight_dtype, activation_dtype, const_scale=False, const_
10861088
orig._tracker.unlock()
10871089
orig.__class__ = cls
10881090
orig._is_int8 = jnp.issubdtype(activation_dtype, jnp.integer)
1089-
orig.positions_qdq = StaticQDQLayer("positions_qdq", activation_dtype, orig.dtype_policy, orig._is_int8, const_scale)
1091+
orig.positions_qdq = StaticQDQLayer(
1092+
"positions_qdq", activation_dtype, orig.dtype_policy, orig._is_int8, const_scale
1093+
)
10901094
orig.inverse_freq_qdq = StaticQDQLayer(
10911095
"inverse_freq_qdq", activation_dtype, orig.dtype_policy, orig._is_int8, const_scale
10921096
)

0 commit comments

Comments
 (0)