Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sq bug-fix for itrex-ut #1642

Merged
merged 3 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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