File tree Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 35
35
BAZEL_REMOTE_CACHE : ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
36
36
BAZEL_JOBS : ' ' # Let bazel decide the parallelism based on the number of CPUs.
37
37
BUILD_CPP_TESTS : 1
38
- GCNO_OUTPUT_DIR : " /tmp/torch-xla-gcno"
39
38
steps :
40
39
# Need to check out local composite actions before using them
41
40
# https://github.com/orgs/community/discussions/11771
Original file line number Diff line number Diff line change @@ -155,7 +155,12 @@ jobs:
155
155
env :
156
156
COVERAGE_FILE : " ${{ env.COVERAGE_DIR }}/py-coverage"
157
157
LLVM_PROFILE_FILE : " ${{ env.COVERAGE_DIR }}/cpp-coverage/data-%p.profraw"
158
- run : pytorch/xla/.github/scripts/run_tests.sh pytorch/ pytorch/xla/ $USE_COVERAGE
158
+ run : |
159
+ pytorch/xla/.github/scripts/run_tests.sh pytorch/ pytorch/xla/ $USE_COVERAGE
160
+ # Merge the profraw files, so that they take less space.
161
+ llvm-profdata-17 merge $COVERAGE_DIR/cpp-coverage/*.profraw -o $COVERAGE_DIR/cpp-coverage.profdata
162
+ # Remove the collected raw coverage files.
163
+ rm -r $COVERAGE_DIR/cpp-coverage
159
164
- name : Upload coverage results
160
165
uses : actions/upload-artifact@v4
161
166
with :
Original file line number Diff line number Diff line change @@ -129,8 +129,13 @@ jobs:
129
129
run_coverage pytorch/xla/test/test_operations.py -v
130
130
run_coverage pytorch/xla/test/dynamo/test_dynamo.py -v
131
131
132
+ # Combine all Python coverage files.
132
133
coverage combine
133
134
coverage lcov --omit="/tmp/*" --ignore-errors -o $COVERAGE_FILE.info
135
+ # Merge the profraw files, so that they take less space.
136
+ llvm-profdata-17 merge $COVERAGE_DIR/cpp-coverage/*.profraw -o $COVERAGE_DIR/cpp-coverage.profdata
137
+ # Remove the collected raw coverage files.
138
+ rm -r $COVERAGE_DIR/cpp-coverage
134
139
if : ${{ matrix.run_python_tests }}
135
140
- name : Triton Tests
136
141
shell : bash
@@ -153,8 +158,13 @@ jobs:
153
158
154
159
run_coverage pytorch/xla/test/test_triton.py
155
160
161
+ # Combine all Python coverage files.
156
162
coverage combine
157
163
coverage lcov --omit="/tmp/*" --ignore-errors -o $COVERAGE_FILE.info
164
+ # Merge the profraw files, so that they take less space.
165
+ llvm-profdata-17 merge $COVERAGE_DIR/cpp-coverage/*.profraw -o $COVERAGE_DIR/cpp-coverage.profdata
166
+ # Remove the collected raw coverage files.
167
+ rm -r $COVERAGE_DIR/cpp-coverage
158
168
if : ${{ matrix.run_triton_tests }}
159
169
- name : Upload coverage results
160
170
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -63,11 +63,10 @@ jobs:
63
63
run : |
64
64
cd pytorch/xla
65
65
${{ matrix.test_script }}
66
- - name : Report no code changes
67
- # Only report the first instance
68
- if : inputs.has_code_changes == 'false' && strategy.job-index == 0
69
- run : |
70
- echo "No code changes were detected that require running the full test suite."
66
+ # Merge the profraw files, so that they take less space.
67
+ llvm-profdata-17 merge $COVERAGE_DIR/cpp-coverage/*.profraw -o $COVERAGE_DIR/cpp-coverage.profdata
68
+ # Remove the collected raw coverage files.
69
+ rm -r $COVERAGE_DIR/cpp-coverage
71
70
- name : Upload coverage results
72
71
uses : actions/upload-artifact@v4
73
72
with :
You can’t perform that action at this time.
0 commit comments