From 34522097b1d847f11263d9005d8dd1ff584c3edb Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sun, 30 May 2021 21:12:10 -0700 Subject: [PATCH] See if we can use tcmalloc in test runner --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f7aebdb..f404085a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,11 +36,16 @@ jobs: run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} - name: Install torch on ubuntu if: startsWith(matrix.os, 'ubuntu') - run: pip install --no-cache-dir torch==${{ matrix.torch }}+cpu torchvision==${{ matrix.torchvision }}+cpu -f https://download.pytorch.org/whl/torch_stable.html + run: | + pip install --no-cache-dir torch==${{ matrix.torch }}+cpu torchvision==${{ matrix.torchvision }}+cpu -f https://download.pytorch.org/whl/torch_stable.html + sudo apt update + sudo apt install -y google-perftools - name: Install requirements run: | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install --no-cache-dir git+https://github.com/mapillary/inplace_abn.git@v1.0.12 - name: Run tests + env: + LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 run: | pytest -vv --durations=0 ./tests