Skip to content

Commit 7fe0ef9

Browse files
author
Ailing Zhang
committed
[test] disable sudo in tmate.
1 parent ce87580 commit 7fe0ef9

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ jobs:
5151
export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
5252
export CXX=clang++-8
5353
python3 -m pip uninstall taichi -y
54-
python3 -m pip install --user -r requirements_dev.txt
55-
python3 -m pip install --user twine
54+
python3 -m pip uninstall taichi-nightly -y
55+
python3 -m pip install -r requirements_dev.txt
56+
python3 -m pip install twine
5657
cd python
5758
git fetch origin master
5859
export TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS
@@ -83,7 +84,12 @@ jobs:
8384
glewinfo
8485
ti diagnose
8586
ti changelog
86-
ti test -vr2 -t2
87+
nvidia-smi
88+
ti test mpm_particle_list -vr2 -t2 -s -a cuda
89+
ti test random -vr2 -t2 -s -a cuda
90+
nvidia-smi
91+
ti test -vr2 -t2 -k "not ndarray"
92+
ti test -vr2 -t1 -k "ndarray"
8793
env:
8894
PYTHON: ${{ matrix.python }}
8995

@@ -105,6 +111,49 @@ jobs:
105111
if [ $PROJECT_NAME == "taichi-nightly" ]; then export PYPI_PWD="$NIGHT_PWD" && python3 build.py upload --skip_build --testpypi --project_name $PROJECT_NAME
106112
elif [ $PROJECT_NAME == "taichi" ]; then export PYPI_PWD="$PROD_PWD" && python3 build.py upload --skip_build; fi
107113
114+
build_and_test_gpu_linux:
115+
name: Build and Test (GPU)
116+
runs-on: [self-hosted, cuda, vulkan, cn]
117+
timeout-minutes: 60
118+
steps:
119+
- uses: actions/checkout@v2
120+
with:
121+
submodules: 'recursive'
122+
123+
- name: Build
124+
run: |
125+
git --version
126+
export PATH=$LLVM_LIB_ROOT_DIR/bin:/usr/local/cuda/bin:$PATH
127+
export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
128+
export CXX=clang++-8
129+
export PYTHON=/usr/bin/python3
130+
$PYTHON -m pip uninstall taichi -y
131+
$PYTHON -m pip install -r requirements_dev.txt
132+
cd python
133+
git fetch origin master
134+
TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS $PYTHON build.py build
135+
cd ..
136+
export NUM_WHL=`ls dist/*.whl | wc -l`
137+
if [ $NUM_WHL -ne 1 ]; then echo 'ERROR: created more than 1 whl.' && exit 1; fi
138+
$PYTHON -m pip install dist/*.whl
139+
env:
140+
LLVM_LIB_ROOT_DIR: /opt/taichi-llvm-10.0.0
141+
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=ON
142+
BUILD_NUM_THREADS: 8
143+
144+
- name: Test
145+
run: |
146+
export PYTHON=/usr/bin/python3
147+
export PATH=$PATH:$HOME/.local/bin
148+
export DISPLAY=:1
149+
hash -r
150+
glewinfo
151+
$PYTHON examples/algorithm/laplace.py
152+
ti diagnose
153+
ti changelog
154+
ti test -vr2 -t2 -k "not ndarray"
155+
ti test -vr2 -t1 -k "ndarray"
156+
108157
build_and_upload_mac:
109158
name: Build and Upload (macOS only)
110159
needs: matrix_prep

python/taichi/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def _test_python(args):
720720
threads = 2
721721

722722
if not os.environ.get('TI_DEVICE_MEMORY_GB'):
723-
os.environ['TI_DEVICE_MEMORY_GB'] = '0.5' # Discussion: #769
723+
os.environ['TI_DEVICE_MEMORY_GB'] = '0.3' # Discussion: #769
724724

725725
env_threads = os.environ.get('TI_TEST_THREADS', '')
726726
threads = args.threads or env_threads or threads

0 commit comments

Comments
 (0)