Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] bundle_deploy examples no longer work, cannot get rid of "CRT not found" errors #17105

Open
oleggolev opened this issue Jun 18, 2024 · 1 comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@oleggolev
Copy link

oleggolev commented Jun 18, 2024

Expected behavior

I am following the instructions for AoT compilation of AI models here. Specifically, I built tvm from source with set(USE_LLVM ON), set(USE_MICRO ON), and set(USE_MICRO_STANDALONE_RUNTIME ON). I should expect to be able to run make inside the tvm/apps/bundle_deploy directory to compile some example inference code into standalone executables.

Actual behavior

Always getting the following error:

ls: ../../build/standalone_crt: No such file or directory
Makefile:24: *** "CRT not found. Ensure you have built the standalone_crt target and try again".  Stop.

The following are the contents of my build directory after building tvm with set(USE_LLVM ON), set(USE_MICRO ON), and set(USE_MICRO_STANDALONE_RUNTIME ON) changed in tvm/cmake/config.cmake:

CMakeCache.txt                  DartConfiguration.tcl           Testing                         cpptest[1]_include.cmake        libtvm_runtime.dylib
CMakeFiles                      Makefile                        cmake_install.cmake             libbacktrace                    temp_config_file.cmake
CTestTestfile.cmake             TVMBuildOptions.txt             compile_commands.json           libtvm.dylib                    tvmConfig.cmake

Environment

I tried doing this on bare metal Intel MacOS as well as via the below Dockerfile with the same results / error.

Steps to reproduce

  1. Pull down tvm locally.
  2. Edit tvm/cmake/config.smake to enable set(USE_LLVM ON), set(USE_MICRO ON), set(USE_MICRO_STANDALONE_RUNTIME ON)
  3. Build the image with docker build -f Dockerfile.tvm -t tvm-bundle-test .

Here is the reference Dockerfile:

FROM ubuntu:22.04

ENV http_proxy $HTTPS_PROXY
ENV https_proxy $HTTPS_PROXY
ENV DEBIAN_FRONTEND=noninteractive 

RUN apt-get update
RUN apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && apt-get update && apt-get install -y \
    python3.8 \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

# Copy the current directory contents into the container at /app.
WORKDIR /app
COPY . /app

# Install CMake and enable dev packaging from third-party source: https://apt.kitware.com/
RUN apt-get update
RUN apt-get -y install gpg wget ca-certificates
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN apt-get update
RUN test -f /usr/share/doc/kitware-archive-keyring/copyright || rm /usr/share/keyrings/kitware-archive-keyring.gpg
RUN apt-get install kitware-archive-keyring
RUN apt-get -y install cmake

# Get other TVM dependencies.
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential libedit-dev libxml2-dev llvm

# Actually build TVM.
WORKDIR /app/tvm
RUN cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
RUN make -j4 -C build

Triage

Please refer to the list of label tags here to find the relevant tags and add them below in a bullet format (example below).

  • vert:micro
  • flow:aot
@oleggolev oleggolev added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Jun 18, 2024
@2448900355
Copy link

版本问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

2 participants