From c8df0eb8b3d333c92f1a5c8aec09ef26d56312fd Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sun, 11 Jun 2023 16:26:35 +0800 Subject: [PATCH] =?UTF-8?q?[cmake]=20fix=20`cusparselt`=E3=80=81`onnxrunti?= =?UTF-8?q?me`=20update=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/external/cusparselt.cmake | 3 +++ cmake/external/onnxruntime.cmake | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmake/external/cusparselt.cmake b/cmake/external/cusparselt.cmake index d1a320f8a4ff8..2d7d81c81b47d 100644 --- a/cmake/external/cusparselt.cmake +++ b/cmake/external/cusparselt.cmake @@ -75,6 +75,9 @@ if(LOCAL_CUSPARSELT_LIB_ZIP) file(MD5 ${CUSPARSELT_DOWNLOAD_DIR}/${CUSPARSELT_CACHE_FILENAME} CUSPARSELT_MD5) if(NOT CUSPARSELT_MD5 EQUAL CUSPARSELT_URL_MD5) + # clean build file + file(REMOVE_RECURSE ${CUSPARSELT_PREFIX_DIR}) + file(REMOVE_RECURSE ${CUSPARSELT_INSTALL_DIR}) download_cusparselt() endif() else() diff --git a/cmake/external/onnxruntime.cmake b/cmake/external/onnxruntime.cmake index 43e67ff48c2c5..b9a1cc840afda 100644 --- a/cmake/external/onnxruntime.cmake +++ b/cmake/external/onnxruntime.cmake @@ -139,6 +139,9 @@ if(LOCAL_ONNXRUNTIME_LIB_ZIP) file(MD5 ${ONNXRUNTIME_DOWNLOAD_DIR}/${ONNXRUNTIME_CACHE_FILENAME} ONNXRUNTIME_MD5) if(NOT ONNXRUNTIME_MD5 EQUAL ONNXRUNTIME_URL_MD5) + # clean build file + file(REMOVE_RECURSE ${ONNXRUNTIME_PREFIX_DIR}) + file(REMOVE_RECURSE ${ONNXRUNTIME_INSTALL_DIR}) download_onnxruntime() endif() else()