Skip to content

Commit

Permalink
[BE] Add optional step to upload coredumps
Browse files Browse the repository at this point in the history
Test plan: cause a crash and make sure core is uploaded

Pull Request resolved: pytorch#74065
Approved by: https://github.com/janeyx99
  • Loading branch information
malfet authored and pytorchmergebot committed Mar 12, 2022
1 parent 1f04a00 commit bbdb758
Show file tree
Hide file tree
Showing 15 changed files with 380 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/templates/common.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,25 @@ concurrency:
test-reports-*.zip
{%- endmacro -%}

{%- macro upload_cores(artifact_name="coredumps", config=None, shard=None, use_s3=True) -%}
{%- if use_s3 %}- uses: !{{ upload_artifact_s3_action }}
name: Store Core dumps on S3
{%- else %}- uses: actions/upload-artifact@v2
name: Store Core dumps on Github
{%- endif %}
if: failure()
with:
{%- if config != "" and shard != "" %}
name: !{{ artifact_name }}-!{{ config }}-!{{ shard }}
{%- else %}
name: !{{ artifact_name }}
{%- endif %}
retention-days: 14
if-no-files-found: ignore
path:
./**/core.[1-9]*
{%- endmacro -%}

{%- macro render_test_results() -%}
- name: Install render_test_results dependencies
if: always()
Expand Down
1 change: 1 addition & 0 deletions .github/templates/linux_ci_workflow.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ jobs:
{%- else %}
!{{ common.upload_downloaded_files(name='linux', config=test_job.config, shard=test_job.shard, num_shards=test_job.num_shards, runner=test_job.runner) }}
!{{ common.upload_test_reports(name='linux', config=test_job.config, shard=test_job.shard, num_shards=test_job.num_shards, runner=test_job.runner) }}
!{{ common.upload_cores(config=test_job.config, shard=test_job.shard) }}
{%- endif %}
!{{ common.upload_test_statistics(build_environment) }}
{%- if 'rocm' in test_runner_type %}
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .github/workflows/generated-linux-bionic-py3.7-clang9.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .github/workflows/generated-linux-xenial-cuda11.3-py3.7-gcc7.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .github/workflows/generated-linux-xenial-py3.7-clang7-asan.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .github/workflows/generated-linux-xenial-py3.7-clang7-onnx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bbdb758

Please sign in to comment.