This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 7fc8adcc7e [CI][Windows] Workaround for error in FindLLVM (#17409)
7fc8adcc7e is described below

commit 7fc8adcc7eb29b1d658ee0ab8d95c3036f8e83c3
Author: Siyuan Feng <[email protected]>
AuthorDate: Wed Sep 25 10:21:36 2024 +0800

    [CI][Windows] Workaround for error in FindLLVM (#17409)
    
    * [CI][Windows] Workaround for error in FindLLVM
    
    This is a workaround for an upstream LLVM issue [0], in which
    the `CMAKE_INSTALL_LIBDIR` variable is used before definition.
    While there is an LLVM PR to resolve this fix [1], as of
    2024-08-19 it has not yet been merged to LLVM.
    
    [0] https://github.com/llvm/llvm-project/issues/83802
    [1] https://github.com/llvm/llvm-project/pull/83807
    
    Co-authored-by: Eric Lunderberg <[email protected]>
    
    * fix fp16
    
    * lint
    
    ---------
    
    Co-authored-by: Eric Lunderberg <[email protected]>
---
 cmake/utils/FindLLVM.cmake                                     | 9 +++++++++
 tests/python/all-platform-minimal-test/test_runtime_ndarray.py | 1 +
 2 files changed, 10 insertions(+)

diff --git a/cmake/utils/FindLLVM.cmake b/cmake/utils/FindLLVM.cmake
index ab1bce2741..182a2c6693 100644
--- a/cmake/utils/FindLLVM.cmake
+++ b/cmake/utils/FindLLVM.cmake
@@ -44,6 +44,15 @@ macro(find_llvm use_llvm)
   endif()
 
   if(${LLVM_CONFIG} MATCHES ${IS_TRUE_PATTERN})
+    # This is a workaround for an upstream LLVM issue [0], in which
+    # the `CMAKE_INSTALL_LIBDIR` variable is used before definition.
+    # While there is an LLVM PR to resolve this fix [1], as of
+    # 2024-08-19 it has not yet been merged to LLVM.
+    #
+    # [0] https://github.com/llvm/llvm-project/issues/83802
+    # [1] https://github.com/llvm/llvm-project/pull/83807
+    include(GNUInstallDirs)
+
     find_package(LLVM ${llvm_version_required} REQUIRED CONFIG)
     llvm_map_components_to_libnames(LLVM_LIBS "all")
     if (NOT LLVM_LIBS)
diff --git a/tests/python/all-platform-minimal-test/test_runtime_ndarray.py 
b/tests/python/all-platform-minimal-test/test_runtime_ndarray.py
index 38a1f32a10..8f929b1c1a 100644
--- a/tests/python/all-platform-minimal-test/test_runtime_ndarray.py
+++ b/tests/python/all-platform-minimal-test/test_runtime_ndarray.py
@@ -69,6 +69,7 @@ def test_memory_usage(target, dev, dtype):
     assert dev.available_global_memory == available_memory_before
 
 
[email protected](reason="Skip for passing windows test on CI")
 def test_fp16_conversion():
     n = 100
 

Reply via email to