Skip to content

[Bug] Windows: 'ProcessSession': is not a member of 'tvm::runtime::Session' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj] #930

@jparismorgan

Description

@jparismorgan

🐛 Bug

I am trying to build MLC Runtime from source on Windows (https://mlc.ai/mlc-llm/docs/deploy/cli.html#id5) but getting:

C:\repo\mlc-llm\cpp\llm_chat.cc(158,29): error C2039: 'ProcessSession': is not a member of 'tvm::runtime::Session' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/disco/session.h(240,7): message : see declaration of 'tvm::runtime::Session' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\cpp\llm_chat.cc(158,29): error C3861: 'ProcessSession': identifier not found [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\cpp\llm_chat.cc(159,19): error C2039: 'InitCCL': is not a member of 'tvm::runtime::SessionObj' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/disco/session.h(165,7): message : see declaration of 'tvm::runtime::SessionObj' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
  Generating Code...

To Reproduce

build\config.cmake contains:

set(TVM_HOME 3rdparty/tvm)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
set(USE_CUDA ON)
set(USE_CUTLASS OFF)
set(USE_CUBLAS OFF)
set(USE_ROCM OFF)
set(USE_VULKAN OFF)
set(USE_METAL OFF)
set(USE_OPENCL OFF)

I then build:

paris@DESKTOP-Q28GDF3 MINGW64 /c/repo/mlc-llm/build (main)
$ cmake .. && cmake --build .
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- Hide private symbols
-- TVM_HOME: 3rdparty/tvm
-- Didn't find the path to CCACHE, disabling ccache
-- VTA build is skipped in Windows..
CMake Warning (dev) at 3rdparty/tvm/cmake/utils/FindCUDA.cmake:44 (find_package):
  Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
  --help-policy CMP0146" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

Call Stack (most recent call first):
  3rdparty/tvm/cmake/modules/CUDA.cmake:19 (find_cuda)
  3rdparty/tvm/CMakeLists.txt:532 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found CUDA_TOOLKIT_ROOT_DIR=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1
-- Found CUDA_CUDA_LIBRARY=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/lib/x64/cuda.lib
-- Found CUDA_CUDART_LIBRARY=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/lib/x64/cudart.lib
-- Found CUDA_NVRTC_LIBRARY=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/lib/x64/nvrtc.lib
-- Found CUDA_CUDNN_INCLUDE_DIRS=
-- Found CUDA_CUDNN_LIBRARY=
-- Found CUDA_CUBLAS_LIBRARY=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/lib/x64/cublas.lib
-- Found CUDA_CURAND_LIBRARY=
-- Found CUDA_CUBLASLT_LIBRARY=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/lib/x64/cublasLt.lib
-- Build with CUDA 11.1 support
-- Build with contrib.random
-- Build with contrib.sort
-- Build with contrib.hybriddump
-- Git found: C:/Program Files/Git/mingw64/bin/git.exe
-- Found TVM_GIT_COMMIT_HASH=631f37b6bf8b101d16ecc55de7e6a749a3588570
-- Found TVM_GIT_COMMIT_TIME=2023-09-13 12:22:20 -0400
-- Building with TVM Map...
-- Build with thread support...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE  
-- Performing Test FILE_PREFIX_MAP_SUPPORTED
-- Performing Test FILE_PREFIX_MAP_SUPPORTED - Failed
-- system-nameWindows
CMake Deprecation Warning at 3rdparty/tokenizers-cpp/msgpack/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
CMake Deprecation Warning at 3rdparty/tokenizers-cpp/sentencepiece/CMakeLists.txt:15 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- VERSION: 0.2.00
-- Configuring done (4.7s)
-- Generating done (0.6s)
-- Build files have been written to: C:/repo/mlc-llm/build
MSBuild version 17.7.2+d6990bcfa for .NET Framework

  Checking File Globs
  1>Checking Build System
  Building Custom Rule C:/repo/mlc-llm/CMakeLists.txt
  cli_main.cc
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(353,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_cli_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(358,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_cli_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(563,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_cli_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(564,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_cli_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(571,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_cli_objs.vcxproj]
  mlc_cli_objs.vcxproj -> C:\repo\mlc-llm\build\mlc_cli_objs.dir\Debug\mlc_cli_objs.lib
  Building Custom Rule C:/repo/mlc-llm/CMakeLists.txt
  conv_templates.cc
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(353,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(358,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(563,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(564,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(571,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
  conversation.cc
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(353,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(358,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(563,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(564,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(571,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
  image_embed.cc
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(353,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(358,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(563,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(564,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(571,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
  llm_chat.cc
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(353,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(358,9): warning C4068: unknown pragma 'disagnostic' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(563,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(564,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/logging.h(571,9): warning C4068: unknown pragma 'GCC' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\cpp\llm_chat.cc(158,29): error C2039: 'ProcessSession': is not a member of 'tvm::runtime::Session' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/disco/session.h(240,7): message : see declaration of 'tvm::runtime::Session' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\cpp\llm_chat.cc(158,29): error C3861: 'ProcessSession': identifier not found [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\cpp\llm_chat.cc(159,19): error C2039: 'InitCCL': is not a member of 'tvm::runtime::SessionObj' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
C:\repo\mlc-llm\3rdparty\tvm\include\tvm/runtime/disco/session.h(165,7): message : see declaration of 'tvm::runtime::SessionObj' [C:\repo\mlc-llm\build\mlc_llm_objs.vcxproj]
  Generating Code...

image

Expected behavior

I can build MLC Runtime for Windows.

Environment

  • Platform (e.g. WebGPU/Vulkan/IOS/Android/CUDA): CUDA
  • Operating system (e.g. Ubuntu/Windows/MacOS/...): Windows 10 Pro
  • Device (e.g. iPhone 12 Pro, PC+RTX 3090, ...): x64, NVIDIA GeForce RTX 2070 SUPER
  • How you installed MLC-LLM (conda, source): No - I believe we don't need this, correct?
  • How you installed TVM-Unity (pip, source): No - I believe we don't need this, correct?
  • Python version (e.g. 3.10): 3.8.3
  • GPU driver version (if applicable): 31.0.15.2756
  • CUDA/cuDNN version (if applicable): cuda_11.1.relgpu_drvr455TC455_06.29190527_0
  • TVM Unity Hash Tag (python -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))", applicable if you compile models):
  • Any other relevant information: cmake version 3.27.5

Additional context

Thank you for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions