-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: sdp <[email protected]>
- Loading branch information
Showing
852 changed files
with
2,614 additions
and
139,291 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
.azure-pipelines/scripts/codeScan/pydocstyle/scan_path_neural_insights.txt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.azure-pipelines/scripts/codeScan/pydocstyle/scan_path_neural_solution.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[run] | ||
branch = True | ||
|
||
[report] | ||
include = | ||
*/neural_compressor/torch/algorithms/habana_fp8/* | ||
*/neural_compressor/torch/amp/* | ||
exclude_lines = | ||
pragma: no cover | ||
raise NotImplementedError | ||
raise TypeError | ||
if self.device == "gpu": | ||
if device == "gpu": | ||
except ImportError: | ||
except Exception as e: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
python -c "import neural_compressor as nc" | ||
test_case="run 3x Torch Habana FP8" | ||
echo "${test_case}" | ||
|
||
# install requirements | ||
echo "set up UT env..." | ||
sed -i '/^intel_extension_for_pytorch/d' /neural-compressor/test/3x/torch/requirements.txt | ||
pip install -r /neural-compressor/test/3x/torch/requirements.txt | ||
pip install git+https://github.com/HabanaAI/[email protected] | ||
pip install pytest-cov | ||
pip install pytest-html | ||
pip list | ||
|
||
export COVERAGE_RCFILE=/neural-compressor/.azure-pipelines/scripts/ut/3x/coverage.3x_pt_fp8 | ||
inc_path=$(python -c 'import neural_compressor; print(neural_compressor.__path__[0])') | ||
cd /neural-compressor/test/3x || exit 1 | ||
|
||
LOG_DIR=/neural-compressor/log_dir | ||
mkdir -p ${LOG_DIR} | ||
ut_log_name=${LOG_DIR}/ut_3x_pt_fp8.log | ||
pytest --cov="${inc_path}" -vs --disable-warnings --html=report.html --self-contained-html torch/algorithms/fp8_quant 2>&1 | tee -a ${ut_log_name} | ||
|
||
cp report.html ${LOG_DIR}/ | ||
|
||
if [ $(grep -c '== FAILURES ==' ${ut_log_name}) != 0 ] || [ $(grep -c '== ERRORS ==' ${ut_log_name}) != 0 ] || [ $(grep -c ' passed' ${ut_log_name}) == 0 ]; then | ||
echo "Find errors in pytest case, please check the output..." | ||
echo "Please search for '== FAILURES ==' or '== ERRORS =='" | ||
exit 1 | ||
fi | ||
|
||
# if ut pass, collect the coverage file into artifacts | ||
cp .coverage ${LOG_DIR}/.coverage | ||
|
||
echo "UT finished successfully! " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.