diff --git a/dipu/scripts/ci/muxi/ci_muxi_script.sh b/dipu/scripts/ci/muxi/ci_muxi_script.sh index 224917046..89b44e7ae 100644 --- a/dipu/scripts/ci/muxi/ci_muxi_script.sh +++ b/dipu/scripts/ci/muxi/ci_muxi_script.sh @@ -18,20 +18,26 @@ function build_dipu() { cmake_maca --build "$path" --parallel 20 2>&1 | tee "${path}/build.log" } -function build_diopi_lib() { +# for reference only +function build_diopi_lib_dyn() { + # export PYTHONPATH="${YOU_TORCH_FOR_DIOPI}:${PYTHONPATH}" cd third_party/DIOPI/impl sh scripts/build_impl.sh clean - sh scripts/build_impl.sh muxi || exit -1 + sh scripts/build_impl.sh muxi_dyload || exit -1 cd - } - case $1 in "build_dipu") - build_dipu # "-DWITH_DIOPI_LIBRARY=${DIOPI_ROOT}" + build_dipu + ;; + "build_diopi_dyn") + build_diopi_lib_dyn ;; "build_dipu_only") - builddipu "-DWITH_DIOPI_LIBRARY=DISABLE" ;; + # build_dipu "-DWITH_DIOPI_LIBRARY=DISABLE" + build_dipu "-DWITH_DIOPI_LIBRARY=${DIOPI_DYN_ROOT}" + ;; *) echo "[ERROR] Incorrect option: $1" && exit 1 ;; esac diff --git a/dipu/scripts/ci/nv/ci_nv_script.sh b/dipu/scripts/ci/nv/ci_nv_script.sh index e38369b64..dfd0515a3 100644 --- a/dipu/scripts/ci/nv/ci_nv_script.sh +++ b/dipu/scripts/ci/nv/ci_nv_script.sh @@ -23,6 +23,15 @@ function build() { cmake --build "$OUTPUT" --parallel 8 2>&1 | tee "${OUTPUT}/build.log" } +# for reference only +function build_diopi_lib_dyn() { + # export PYTHONPATH="${YOU_TORCH_FOR_DIOPI}:${PYTHONPATH}" + cd third_party/DIOPI/impl + sh scripts/build_impl.sh clean + sh scripts/build_impl.sh torch_dyload || exit -1 + cd - +} + case $1 in "build_dipu") clean @@ -31,9 +40,13 @@ case $1 in "build_dipu_dev") build "${@:2}" ;; +"build_diopi_dyn") + build_diopi_lib_dyn + ;; "build_dipu_only") clean build "-DWITH_DIOPI_LIBRARY=DISABLE" + # build "-DWITH_DIOPI_LIBRARY=${DIOPI_DYN_ROOT}" ;; *) echo "[ERROR] Incorrect option: $1" && exit 1