Skip to content

Commit

Permalink
sq bug-fix for itrex-ut (#1642)
Browse files Browse the repository at this point in the history
Signed-off-by: Lu, Yintong <[email protected]>
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
yintong-lu authored Mar 1, 2024
1 parent a8c17bf commit 28e82b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .azure-pipelines/scripts/ut/run_itrex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ bash /intel-extension-for-transformers/.github/workflows/script/prepare_env.sh
bash /intel-extension-for-transformers/.github/workflows/script/install_binary.sh

# prepare test env
# tmp install transformers for incompatible issue
pip install transformers
sed -i '/neural-compressor.git/d' /intel-extension-for-transformers/tests/requirements.txt
pip install -r /intel-extension-for-transformers/tests/requirements.txt
LOG_DIR=/neural-compressor/log_dir
mkdir -p ${LOG_DIR}
Expand Down
3 changes: 2 additions & 1 deletion neural_compressor/adaptor/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,8 @@ def smooth_quant(
kwargs["percentile"] = percentile
if scales_per_op is not None:
kwargs["scales_per_op"] = scales_per_op
auto_alpha_args["init_alpha"] = default_alpha
if alpha == "auto":
auto_alpha_args["init_alpha"] = default_alpha
model._model = self.sq.transform(
alpha=alpha,
folding=folding,
Expand Down

0 comments on commit 28e82b1

Please sign in to comment.