Skip to content

Commit df742ed

Browse files
committed
test(lora): update CMakeLists and setup.py for LoRA integration
1 parent 5890741 commit df742ed

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ add_library(mlc_llm_objs OBJECT ${MLC_LLM_SRCS})
7878
set(MLC_LLM_INCLUDES
7979
${TVM_SOURCE_DIR}/include ${TVM_SOURCE_DIR}/3rdparty/dlpack/include
8080
${TVM_SOURCE_DIR}/3rdparty/dmlc-core/include
81-
${TVM_SOURCE_DIR}/3rdparty/picojson)
81+
${TVM_SOURCE_DIR}/3rdparty/picojson
82+
${CMAKE_BINARY_DIR}/tvm/include)
8283

8384
set(MLC_LLM_COMPILE_DEFS ${MLC_LLM_COMPILE_DEFS}
8485
DMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>)

python/setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def get_lib_path():
2222
# conda installs libraries into env instead of packaging with pip
2323
if not CONDA_BUILD:
2424
libs = [
25-
libinfo["find_lib_path"]("mlc_llm")[0],
26-
libinfo["find_lib_path"]("mlc_llm_module")[0],
25+
*libinfo["find_lib_path"]("mlc_llm", optional=True),
26+
*libinfo["find_lib_path"]("mlc_llm_module", optional=True),
2727
]
2828
else:
2929
libs = None
@@ -65,7 +65,7 @@ def is_pure(self):
6565
def main():
6666
"""The main entrypoint."""
6767
setup_kwargs = {}
68-
if not CONDA_BUILD:
68+
if not CONDA_BUILD and LIB_LIST:
6969
with open("MANIFEST.in", "w", encoding="utf-8") as fo:
7070
for path in LIB_LIST:
7171
if os.path.isfile(path):
@@ -125,7 +125,7 @@ def _remove_path(path):
125125
elif os.path.isdir(path):
126126
shutil.rmtree(path)
127127

128-
if not CONDA_BUILD:
128+
if not CONDA_BUILD and LIB_LIST:
129129
# Wheel cleanup
130130
os.remove("MANIFEST.in")
131131
for path in LIB_LIST:

0 commit comments

Comments
 (0)