Unverified Commit 415caeb6 authored by Przemyslaw Tredak's avatar Przemyslaw Tredak Committed by GitHub
Browse files

Test build as GitHub action (#13)



* Build the wheel as GitHub action
Signed-off-by: default avatarPrzemek Tredak <ptredak@nvidia.com>

* Change the sanity test
Signed-off-by: default avatarPrzemek Tredak <ptredak@nvidia.com>
Signed-off-by: default avatarPrzemek Tredak <ptredak@nvidia.com>
parent 92e6ee1d
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.
# A workflow to trigger TE build on GitHub
name: 'Test build'
on:
pull_request:
workflow_dispatch:
jobs:
pyTorch:
name: 'pyTorch build'
runs-on: ubuntu-latest
container:
image: nvcr.io/nvidia/pytorch:22.09-py3
options: --user root
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Build'
run: |
mkdir -p wheelhouse && \
pip wheel -w wheelhouse . -v
- name: 'Upload wheel'
uses: actions/upload-artifact@v3
with:
name: te_wheel
path: wheelhouse/*.whl
retention-days: 7
- name: 'Install'
run: pip install --no-cache-dir wheelhouse/*.whl
- name: 'Sanity check'
run: python tests/test_sanity_import.py
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.
try:
import transformer_engine.pytorch
te_imported = True
except:
te_imported = False
assert te_imported, 'transformer_engine import failed'
print("OK")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment