Browse Source

feat(whl): force import megbrain before import megengine

GitOrigin-RevId: dc48c56b8a
master
Megvii Engine Team 2 years ago
parent
commit
6fac92dd9d
2 changed files with 4 additions and 3 deletions
  1. +3
    -2
      imperative/python/test/run.sh
  2. +1
    -1
      scripts/whl/BUILD_PYTHON_WHL_README.md

+ 3
- 2
imperative/python/test/run.sh View File

@@ -42,9 +42,10 @@ else
cd $(dirname "${BASH_SOURCE[0]}")/..
test_dirs="megengine test"
echo "test develop env"
PYTHONPATH="." PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -s -v $test_dirs -m 'not isolated_distributed'
TEST_PY_PATH="."
PYTHONPATH=${TEST_PY_PATH} PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -s -v $test_dirs -m 'not isolated_distributed'
if [[ "$TEST_PLAT" =~ "cuda" ]]; then
echo "test GPU pytest now"
PYTHONPATH="." PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -s -v $test_dirs -m 'isolated_distributed'
PYTHONPATH=${TEST_PY_PATH} PY_IGNORE_IMPORTMISMATCH=1 python3 -m pytest -s -v $test_dirs -m 'isolated_distributed'
fi
fi

+ 1
- 1
scripts/whl/BUILD_PYTHON_WHL_README.md View File

@@ -98,4 +98,4 @@ If you do not want to create whl file when debug Python3 binding, you can call `
* cuda with `RelWithDebInfo` mode: `EXTRA_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" scripts/cmake-build/host_build.sh -c -t`
* cpu only with `RelWithDebInfo` mode: `EXTRA_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" scripts/cmake-build/host_build.sh -t`

Start `Python3 ` with env for support `MegEngine` after build: `PYTHONPATH=imperative/python:$PYTHONPATH python3 `
Start `Python3 ` with env for support `MegEngine` after build: `PYTHONPATH=imperative/python:python_module:$PYTHONPATH python3 `

Loading…
Cancel
Save