Skip to content

Daisyden/artifacts3 #1664

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
24 changes: 23 additions & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,31 @@ python third_party/torch-xpu-ops/.github/scripts/apply_torch_pr.py
git submodule sync && git submodule update --init --recursive
python -m pip install -r requirements.txt
python -m pip install mkl-static mkl-include
# python -m pip install -U cmake==3.31.6
export USE_STATIC_MKL=1
export USE_ONEMKL=1
export USE_XCCL=1
export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" \
intel-cmplr-lib-rt==2025.1.1 | \
intel-cmplr-lib-ur==2025.1.1 | \
intel-cmplr-lic-rt==2025.1.1 | \
intel-sycl-rt==2025.1.1 | \
oneccl-devel==2021.15.1; platform_system == 'Linux' and platform_machine == 'x86_64' | \
oneccl==2021.15.1; platform_system == 'Linux' and platform_machine == 'x86_64' | \
impi-rt==2021.15.0; platform_system == 'Linux' and platform_machine == 'x86_64' | \
onemkl-sycl-blas==2025.1.0 | \
onemkl-sycl-dft==2025.1.0 | \
onemkl-sycl-lapack==2025.1.0 | \
onemkl-sycl-rng==2025.1.0 | \
onemkl-sycl-sparse==2025.1.0 | \
dpcpp-cpp-rt==2025.1.1 | \
intel-opencl-rt==2025.1.1 | \
mkl==2025.1.0 | \
intel-openmp==2025.1.1 | \
tbb==2022.1.0 | \
tcmlib==1.3.0 | \
umf==0.10.0 | \
intel-pti==0.12.0
"

# Build
sed -i "s/checkout --quiet \${TORCH_XPU_OPS_COMMIT}/log -n 1/g" caffe2/CMakeLists.txt
Expand Down
40 changes: 31 additions & 9 deletions .github/scripts/check-ut.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,22 @@ def get_result(case):
def get_message(case):
if not case.result:
return ""
return f"{case.result[0].message.splitlines()[0]}"
lines = case.result[0].message.splitlines()
message = []
message.append(f"{case.result[0].message.splitlines()[0]}")
collect = False
for line in lines:
if "Traceback" in line:
collect = True
if collect and "Error: " in line:
collect = False
break
if collect:
message.append(line)

def print_md_row(row, print_header):
return "".join(message)

def print_md_row(row, print_header, failure_list=None):
if print_header:
header = " | ".join([f"{key}" for key, _ in row.items()])
print(f"| {header} |")
Expand All @@ -41,7 +54,11 @@ def print_md_row(row, print_header):
row = " | ".join([f"{value}" for _, value in row.items()])
print(f"| {row} |")

def print_cases(cases):
if failure_list is not None:
failure_list.write(f"| {row} |\n")


def print_cases(cases, failure_list=None):
print_header = True
for case in cases:
classname = get_classname(case)
Expand All @@ -54,9 +71,10 @@ def print_cases(cases):
'Status': result,
'Message': message,
}
print_md_row(row, print_header)
print_md_row(row, print_header, failure_list=failure_list)
print_header = False


def print_suite(suite):
print_header = True
for suite in suites:
Expand All @@ -75,6 +93,9 @@ def print_suite(suite):
category = 'op_extended'
elif 'op_ut' in ut:
category = 'op_ut'
else:
category = "unknown"

row = {
'Category': category,
'UT': ut,
Expand Down Expand Up @@ -103,11 +124,12 @@ def print_break(needed):
if needed:
print("")

if failures:
print_break(printed)
print("### Failures")
print_cases(failures)
printed = True
with open("ut_failure_list.csv", "w") as failure_list:
if failures:
print_break(printed)
print("### Failures")
print_cases(failures, failure_list=failure_list)
printed = True

print("### Results Summary")
print_suite(suites)
Expand Down
16 changes: 1 addition & 15 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
#!/bin/bash

source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/umf/latest/env/vars.sh
source /opt/intel/oneapi/pti/latest/env/vars.sh
source /opt/intel/oneapi/umf/latest/env/vars.sh
source /opt/intel/oneapi/ccl/latest/env/vars.sh
source /opt/intel/oneapi/mpi/latest/env/vars.sh
source /opt/intel/oneapi/mkl/latest/env/vars.sh
export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="\
intel-cmplr-lib-rt==2025.0.5 |\
intel-cmplr-lib-ur==2025.0.5 |\
intel-cmplr-lic-rt==2025.0.5 |\
intel-sycl-rt==2025.0.5 |\
impi-devel==2021.14.2 |\
oneccl-devel==2021.14.1 |\
mkl-devel==2025.0.1 |\
onemkl-sycl-blas==2025.0.1 |\
onemkl-sycl-dft==2025.0.1 |\
onemkl-sycl-lapack==2025.0.1 |\
tcmlib==1.2.0 | umf==0.9.1 | intel-pti==0.10.2 \
"
9 changes: 9 additions & 0 deletions .github/workflows/_linux_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ jobs:
source activate xpu_op_${ZE_AFFINITY_MASK}
pip install junitparser
python .github/scripts/check-ut.py ${{ github.workspace }}/ut_log/*.xml >> $GITHUB_STEP_SUMMARY || true
if [ -e "ut_failure_list.csv" ];then
cp ut_failure_list.csv ${{ github.workspace }}/ut_log/ut_failure_list.csv >> $GITHUB_STEP_SUMMARY || true
fi
- name: UT Test Results Check
shell: bash
run: |
Expand Down Expand Up @@ -310,6 +313,12 @@ jobs:
with:
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log
- name: Upload XPU UT Failure list
if: always()
uses: actions/upload-artifact@v4
with:
name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log/ut_failure_list.csv

distributed_ut_test:
runs-on: pvc_e2e
Expand Down