test.sh 615 Bytes
Newer Older
1
# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
3
4
5
6
7
#
# See LICENSE for license information.

set -x

: ${THUNDER_PATH:=/opt/pytorch/lightning-thunder}
8
9
: ${XML_LOG_DIR:=/logs}
mkdir -p "$XML_LOG_DIR"
10
11

pip3 install pytest==8.1.1 pytest-benchmark==5.1.0
12
python3 -m pytest -v -s --junitxml=$XML_LOG_DIR/pytest.xml ${THUNDER_PATH}/thunder/tests/test_transformer_engine_executor.py
13
14
15
16
17
18
19
20
21

# Check return code
# Note: Return code 5 is fine. Lightning tests are skipped on systems
# without FP8 support and Pytest returns 5 if no tests are run.
RC=$?
if [ ${RC} -eq 5 ]; then
    RC=0
fi
exit ${RC}