test.sh 816 Bytes
Newer Older
1
# Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Przemek Tredak's avatar
Przemek Tredak committed
2
3
4
5
6
7
8
9
#
# See LICENSE for license information.

set -e

: "${TE_PATH:=/opt/transformerengine}"

pip install cpplint==1.6.0 pylint==2.13.5
10
11
if [ -z "${PYTHON_ONLY}" ]
then
12
  cp $TE_PATH/qa/L0_pytorch_lint/CPPLINT.cfg $TE_PATH
13
  cd $TE_PATH
14
15
16
17
  echo "Checking common API headers"
  cpplint --root transformer_engine/common/include --recursive transformer_engine/common/include
  echo "Checking C++ files"
  cpplint --recursive --exclude=transformer_engine/common/include transformer_engine
18
  cpplint --recursive transformer_engine/pytorch
19
fi
20
21
if [ -z "${CPP_ONLY}" ]
then
22
  cp $TE_PATH/qa/L0_pytorch_lint/pylintrc $TE_PATH
23
  cd $TE_PATH
24
  echo "Checking Python files"
25
  pylint --recursive=y transformer_engine/common transformer_engine/pytorch
26
fi