From 9d483d462e0817010cccee6c1170b1b1a068a6a0 Mon Sep 17 00:00:00 2001 From: Abhikrant Sharma Date: Wed, 10 Jan 2024 20:26:08 +0530 Subject: [PATCH 1/3] [LLVM] Update Host.h path (#16373) [LLVM] Update Host.h LLVM header path Due to LLVM PR https://github.com/llvm/llvm-project/pull/74261, Host.h has been moved to a new location in LLVM --- src/target/llvm/llvm_instance.cc | 4 ++++ src/target/llvm/llvm_module.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/target/llvm/llvm_instance.cc b/src/target/llvm/llvm_instance.cc index 9e88222059cc..08ba34cc73fa 100644 --- a/src/target/llvm/llvm_instance.cc +++ b/src/target/llvm/llvm_instance.cc @@ -42,7 +42,11 @@ #include #include #include +#if TVM_LLVM_VERSION >= 180 +#include +#else #include +#endif #include #include #include diff --git a/src/target/llvm/llvm_module.cc b/src/target/llvm/llvm_module.cc index 4823f2c9eade..62ea797edd2e 100644 --- a/src/target/llvm/llvm_module.cc +++ b/src/target/llvm/llvm_module.cc @@ -41,7 +41,11 @@ #include #include #include +#if TVM_LLVM_VERSION >= 180 +#include +#else #include +#endif #include #include #include From 3166366af699bceb454c5dac514a4cfc75e0bfad Mon Sep 17 00:00:00 2001 From: Luke Hutton Date: Wed, 10 Jan 2024 15:47:26 +0000 Subject: [PATCH 2/3] [CI] Upgrade sccache version to 0.7.* (#16366) * [CI] Upgrade sccache version to 0.7.* Sccache was previously pinned at version 0.3.3, however, there has recently been an issue when installing some of its dependencies: ``` error[E0277]: expected a `Fn(reqwest::Request, &'a mut task_local_extensions::extensions::Extensions, reqwest_middleware::Next<'a>)` closure, found `RetryAfterMiddleware` ``` Upgrading the version of sccache to the latest seems to resolve this error. * Use an alternative mirror for boost artifacts The JFrog artifactory link is down, so changing to an alternative mirror mentioned in boostorg/boost#842. --- docker/install/ubuntu_install_boost.sh | 2 +- docker/install/ubuntu_install_sccache.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/install/ubuntu_install_boost.sh b/docker/install/ubuntu_install_boost.sh index 9a6e3d707dc8..13f34fddcc73 100755 --- a/docker/install/ubuntu_install_boost.sh +++ b/docker/install/ubuntu_install_boost.sh @@ -27,7 +27,7 @@ trap cleanup 0 # NOTE: by default, tvm-venv python is used. Install boost on the system. PATH=${PATH/${TVM_VENV}\/bin:/} -curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.gz +curl -LO https://archives.boost.io/release/1.67.0/source/boost_1_67_0.tar.gz BOOST_HASH=8c247e040303a97895cee9c9407ef205e2c3ab09f0b8320997835ad6221dff23a87231629498ccfd0acca473f74e9ec27b8bd774707b062228df1e5f72d44c92 echo "$BOOST_HASH" boost_1_67_0.tar.gz | sha512sum -c tar -xf boost_1_67_0.tar.gz diff --git a/docker/install/ubuntu_install_sccache.sh b/docker/install/ubuntu_install_sccache.sh index f87a97ce6dd7..07a7d48b1d90 100755 --- a/docker/install/ubuntu_install_sccache.sh +++ b/docker/install/ubuntu_install_sccache.sh @@ -20,7 +20,7 @@ set -e set -u set -o pipefail -cargo install --version 0.3.3 sccache +cargo install --version 0.7.* sccache # The docs specifically recommend hard links: https://github.com/mozilla/sccache#known-caveats mkdir /opt/sccache From 524ec5f1b03b54d796160ca1eca5804edbe38b3e Mon Sep 17 00:00:00 2001 From: Wuwei Lin Date: Wed, 10 Jan 2024 09:47:02 -0800 Subject: [PATCH 3/3] [Runtime] Use cudaGetDeviceCount to check if device exists (#16377) Using `cudaDeviceGetAttribute` will set the global error code when the device doesn't exist and will impact subsequent CUDA API calls. --- src/runtime/cuda/cuda_device_api.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/runtime/cuda/cuda_device_api.cc b/src/runtime/cuda/cuda_device_api.cc index 21416f619fae..769f01063ff2 100644 --- a/src/runtime/cuda/cuda_device_api.cc +++ b/src/runtime/cuda/cuda_device_api.cc @@ -42,8 +42,9 @@ class CUDADeviceAPI final : public DeviceAPI { int value = 0; switch (kind) { case kExist: - value = (cudaDeviceGetAttribute(&value, cudaDevAttrMaxThreadsPerBlock, dev.device_id) == - cudaSuccess); + int count; + CUDA_CALL(cudaGetDeviceCount(&count)); + value = static_cast(dev.device_id < count); break; case kMaxThreadsPerBlock: { CUDA_CALL(cudaDeviceGetAttribute(&value, cudaDevAttrMaxThreadsPerBlock, dev.device_id));