Skip to content

Commit 831796a

Browse files
tqchenzhiics
authored andcommitted
[DEPRECATION] Remove NNVM compiler (apache#4571)
* Remove NNVM compiler
1 parent b849be4 commit 831796a

File tree

186 files changed

+45
-31262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+45
-31262
lines changed

CMakeLists.txt

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ else(MSVC)
119119
endif(MSVC)
120120

121121
# add source group
122-
FILE(GLOB_RECURSE GROUP_SOURCE "src/*.cc" "nnvm/src/*.cc")
123-
FILE(GLOB_RECURSE GROUP_INCLUDE "src/*.h" "include/*.h"
124-
"nnvm/src/*.h" "nnvm/include/*.h")
122+
FILE(GLOB_RECURSE GROUP_SOURCE "src/*.cc")
123+
FILE(GLOB_RECURSE GROUP_INCLUDE "src/*.h" "include/*.h")
125124
assign_source_group("Source" ${GROUP_SOURCE})
126125
assign_source_group("Include" ${GROUP_INCLUDE})
127126

@@ -175,14 +174,6 @@ if(NOT MSVC)
175174
list(APPEND COMPILER_SRCS ${COMPILER_VERILOG_SRCS})
176175
endif()
177176

178-
file(GLOB_RECURSE NNVM_COMPILER_SRCS
179-
nnvm/src/c_api/*.cc
180-
nnvm/src/core/*.cc
181-
nnvm/src/pass/*.cc
182-
nnvm/src/compiler/*.cc
183-
nnvm/src/top/*.cc
184-
)
185-
186177
file(GLOB TOPI_SRCS
187178
topi/src/*.cc
188179
)
@@ -297,7 +288,6 @@ if(NOT USE_SGX STREQUAL "OFF")
297288
add_dependencies(tvm_runtime sgx_edl tvm_t)
298289
install(TARGETS tvm_t ARCHIVE DESTINATION lib${LIB_SUFFIX})
299290
endif()
300-
add_library(nnvm_compiler SHARED ${NNVM_COMPILER_SRCS})
301291

302292
if(USE_THREADS)
303293
message(STATUS "Build with thread support...")
@@ -307,14 +297,11 @@ if(USE_THREADS)
307297
target_link_libraries(tvm Threads::Threads)
308298
target_link_libraries(tvm_topi Threads::Threads)
309299
target_link_libraries(tvm_runtime Threads::Threads)
310-
target_link_libraries(nnvm_compiler Threads::Threads)
311300
endif(USE_THREADS)
312301

313302
target_link_libraries(tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS})
314303
target_link_libraries(tvm_topi tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS})
315304
target_link_libraries(tvm_runtime ${TVM_RUNTIME_LINKER_LIBS})
316-
target_link_libraries(tvm_runtime_static ${TVM_RUNTIME_LINKER_LIBS})
317-
target_link_libraries(nnvm_compiler tvm)
318305

319306
if (HIDE_PRIVATE_SYMBOLS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
320307
set(HIDE_SYMBOLS_LINKER_FLAGS "-Wl,--exclude-libs,ALL")
@@ -324,7 +311,6 @@ if (HIDE_PRIVATE_SYMBOLS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
324311
target_link_libraries(tvm ${HIDE_SYMBOLS_LINKER_FLAGS})
325312
target_link_libraries(tvm_topi ${HIDE_SYMBOLS_LINKER_FLAGS})
326313
target_link_libraries(tvm_runtime ${HIDE_SYMBOLS_LINKER_FLAGS})
327-
target_link_libraries(nnvm_compiler ${HIDE_SYMBOLS_LINKER_FLAGS})
328314
endif()
329315

330316
# Related headers
@@ -334,10 +320,7 @@ target_include_directories(
334320
target_include_directories(
335321
tvm_topi
336322
PUBLIC "topi/include")
337-
target_include_directories(
338-
nnvm_compiler
339-
PUBLIC "nnvm/include"
340-
PUBLIC "topi/include")
323+
341324

342325
# Tests
343326
set(TEST_EXECS "")
@@ -376,8 +359,6 @@ add_custom_target(runtime DEPENDS tvm_runtime)
376359
install(TARGETS tvm DESTINATION lib${LIB_SUFFIX})
377360
install(TARGETS tvm_topi DESTINATION lib${LIB_SUFFIX})
378361
install(TARGETS tvm_runtime DESTINATION lib${LIB_SUFFIX})
379-
install(TARGETS tvm_runtime_static DESTINATION lib${LIB_SUFFIX})
380-
install(TARGETS nnvm_compiler DESTINATION lib${LIB_SUFFIX})
381362

382363
if (INSTALL_DEV)
383364
install(
@@ -400,11 +381,6 @@ if (INSTALL_DEV)
400381
FILES_MATCHING
401382
PATTERN "*.h"
402383
)
403-
install(
404-
DIRECTORY "nnvm/include/." DESTINATION "include"
405-
FILES_MATCHING
406-
PATTERN "*.h"
407-
)
408384
else(INSTALL_DEV)
409385
install(
410386
DIRECTORY "include/tvm/runtime/." DESTINATION "include/tvm/runtime"
@@ -417,5 +393,4 @@ endif(INSTALL_DEV)
417393
if(MSVC)
418394
target_compile_definitions(tvm PRIVATE -DTVM_EXPORTS)
419395
target_compile_definitions(tvm_runtime PRIVATE -DTVM_EXPORTS)
420-
target_compile_definitions(nnvm_compiler PRIVATE -DNNVM_EXPORTS)
421396
endif()

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,12 @@ build/libtvm_web_runtime.js: build/libtvm_web_runtime.bc
6969
cpplint:
7070
python3 3rdparty/dmlc-core/scripts/lint.py vta cpp vta/include vta/src
7171
python3 3rdparty/dmlc-core/scripts/lint.py topi cpp topi/include;
72-
python3 3rdparty/dmlc-core/scripts/lint.py nnvm cpp nnvm/include nnvm/src;
7372
python3 3rdparty/dmlc-core/scripts/lint.py tvm cpp include src \
7473
examples/extension/src examples/graph_executor/src
7574

7675
pylint:
7776
python3 -m pylint python/tvm --rcfile=$(ROOTDIR)/tests/lint/pylintrc
7877
python3 -m pylint topi/python/topi --rcfile=$(ROOTDIR)/tests/lint/pylintrc
79-
python3 -m pylint nnvm/python/nnvm --rcfile=$(ROOTDIR)/tests/lint/pylintrc
8078
python3 -m pylint vta/python/vta --rcfile=$(ROOTDIR)/tests/lint/pylintrc
8179

8280
jnilint:

conda/tvm/build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,7 +26,3 @@ cd ..
2626
cd topi/python
2727
$PYTHON setup.py install --single-version-externally-managed --record=/tmp/record.txt
2828
cd ../..
29-
30-
cd nnvm/python
31-
$PYTHON setup.py install --single-version-externally-managed --record=/tmp/record.txt
32-
cd ../..

conda/tvm/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ test:
4848
imports:
4949
- tvm
5050
- topi
51-
- nnvm
5251
requires:
5352
- pytest
5453
- scipy

docker/Dockerfile.demo_android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ RUN cd /usr && \
7070
make -j10
7171

7272
# Environment variables
73-
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/nnvm/python/:/usr/tvm/vta/python:${PYTHONPATH}
73+
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/vta/python:${PYTHONPATH}
7474
ENV ANDROID_HOME=/opt/android-sdk-linux/

docker/Dockerfile.demo_cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ COPY install/install_tvm_cpu.sh /install/install_tvm_cpu.sh
3030
RUN bash /install/install_tvm_cpu.sh
3131

3232
# Environment variables
33-
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/nnvm/python/:/usr/tvm/vta/python:${PYTHONPATH}
33+
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/vta/python:${PYTHONPATH}

docker/Dockerfile.demo_gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY install/install_tvm_gpu.sh /install/install_tvm_gpu.sh
2828
RUN bash /install/install_tvm_gpu.sh
2929

3030
# Environment variables
31-
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/nnvm/python/:/usr/tvm/vta/python:${PYTHONPATH}
31+
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/vta/python:${PYTHONPATH}
3232
ENV PATH=/usr/local/nvidia/bin:${PATH}
3333
ENV PATH=/usr/local/cuda/bin:${PATH}
3434
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

docker/Dockerfile.demo_opencl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ RUN mkdir -p ${TVM_BUILD_DIR} && \
7676
make -j6
7777

7878
RUN echo "Building Python package"
79-
ENV PYTHONPATH=${TVM_HOME}/python:${TVM_HOME}/topi/python:${TVM_HOME}/nnvm/python:${PYTHONPATH}
79+
ENV PYTHONPATH=${TVM_HOME}/python:${TVM_HOME}/topi/python:${PYTHONPATH}
8080
RUN cd ${TVM_HOME}/python && python3 setup.py install --user
8181
RUN cd ${TVM_HOME}/topi/python && python3 setup.py install --user
82-
RUN cd ${TVM_HOME}/nnvm/python && python3 setup.py install --user

jvm/core/src/main/java/org/apache/tvm/contrib/GraphRuntime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class GraphRuntime {
3333
/**
3434
* Create a runtime executor module given a graph and module.
35-
* @param graphJson The graph deployed in json format output by nnvm graph.
35+
* @param graphJson The graph deployed in json format output by compiler.
3636
* @param libmod The module of the corresponding function.
3737
* @param ctx The local or remote context to deploy the module.
3838
* @return Runtime graph module that can be used to execute the graph.

nnvm/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ TVMPATH = ..
3030

3131
export LDFLAGS = -pthread -lm
3232
export CFLAGS = -std=c++11 -Wall -O2 -Iinclude -fPIC
33-
CFLAGS += -I$(TVMPATH)/include -I$(TVMPATH)/3rdparty/dlpack/include -I$(TVMPATH)/3rdparty/HalideIR/src -I$(TVMPATH)/topi/include
3433

3534
ifdef DMLC_CORE_PATH
3635
CFLAGS += -I$(DMLC_CORE_PATH)/include
@@ -66,7 +65,7 @@ else
6665
NO_WHOLE_ARCH= --no-whole-archive
6766
endif
6867

69-
all: lib/libnnvm.a lib/libnnvm_compiler.$(SHARED_LIBRARY_SUFFIX)
68+
all: lib/libnnvm.a lib/libnnvm.$(SHARED_LIBRARY_SUFFIX)
7069

7170
SRC = $(wildcard src/*.cc src/c_api/*.cc src/core/*.cc src/pass/*.cc)
7271
SRC_COMPILER = $(wildcard src/top/*/*.cc wildcard src/top/vision/*/*.cc src/compiler/*.cc src/compiler/*/*.cc)
@@ -87,7 +86,7 @@ lib/libnnvm.a: $(ALL_DEP)
8786
@mkdir -p $(@D)
8887
$(AR) crv $@ $(filter %.o, $?)
8988

90-
lib/libnnvm_compiler.$(SHARED_LIBRARY_SUFFIX): lib/libnnvm.a ${TOP_OBJ}
89+
lib/libnnvm.$(SHARED_LIBRARY_SUFFIX): lib/libnnvm.a ${TOP_OBJ}
9190
@mkdir -p $(@D)
9291
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o, $^) $(LDFLAGS) -Wl,${WHOLE_ARCH} lib/libnnvm.a -Wl,${NO_WHOLE_ARCH}
9392

0 commit comments

Comments
 (0)