Unverified Commit 01d207fa authored by Chaofan Lin's avatar Chaofan Lin Committed by GitHub
Browse files

[Installation] Fix building using customized TVM path (#1326)

parent 2a70fd3f
......@@ -3,12 +3,15 @@
set(TVM_BUILD_FROM_SOURCE TRUE)
set(TVM_SOURCE ${CMAKE_SOURCE_DIR}/3rdparty/tvm)
if(DEFINED $ENV{TVM_ROOT})
if(DEFINED ENV{TVM_ROOT})
if(EXISTS $ENV{TVM_ROOT}/cmake/config.cmake)
set(TVM_SOURCE $ENV{TVM_ROOT})
message(STATUS "Using TVM_ROOT from environment variable: ${TVM_SOURCE}")
endif()
endif()
message(STATUS "Using TVM source: ${TVM_SOURCE}")
set(TVM_INCLUDES
${TVM_SOURCE}/include
${TVM_SOURCE}/src
......
......@@ -93,14 +93,16 @@ Some useful CMake options you can toggle while configuring:
(using-existing-tvm)=
### Building with Existing TVM Installation
### Building with Customized TVM Path
If you already have a compatible TVM installation, use the `TVM_ROOT` environment variable to specify the location of your existing TVM repository when building tilelang:
If you already have a TVM codebase, use the `TVM_ROOT` environment variable to specify the location of your existing TVM repository when building tilelang:
```bash
TVM_ROOT=<your-tvm-repo> pip install . -v
```
> **Note**: This will still rebuild the TVM-related libraries (stored in `TL_LIBS`). And this method often leads to some path issues. Check `env.py` to see some environment variables which are not set properly.
(install-using-docker)=
## Install Using Docker
......@@ -197,8 +199,7 @@ Set `NO_TOOLCHAIN_VERSION=ON` to disable this.
### Run-time environment variables
<!-- TODO: tvm -->
TODO
Please refer to the `env.py` file for a full list of supported run-time environment variables.
## Other Tips
......
......@@ -314,9 +314,9 @@ else:
if tvm_path not in sys.path:
prepend_pythonpath(tvm_path)
env.TVM_IMPORT_PYTHON_PATH = tvm_path
if os.environ.get("TVM_LIBRARY_PATH") is None:
os.environ['TVM_LIBRARY_PATH'] = env.TVM_LIBRARY_PATH = os.pathsep.join(TL_LIBS)
# By default, the built TVM-related libraries are stored in TL_LIBS.
if os.environ.get("TVM_LIBRARY_PATH") is None:
os.environ['TVM_LIBRARY_PATH'] = env.TVM_LIBRARY_PATH = os.pathsep.join(TL_LIBS)
# Initialize CUTLASS paths
if os.environ.get("TL_CUTLASS_PATH", None) is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment