Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
graph executor c api removal (#18598)
Browse files Browse the repository at this point in the history
* add default ctx to cachedop fwd

* add test

* perl fix

* initial commit

* update sparse tests

* add aux_states

* fix aux-state type

* fix some tests

* fix check symbolic forwrad/backward

* fix symbolic grad check

* arg_dict fixes

* support init ops

* support forward only graph

* fix check symbolic backward stype

* add missing file

* replace extension test bind

* replace bind with _bind

* simplify backward_mul implementation

* small fix

* drop contrib.sparseembedding

* remove simple_bind in test sparse ops

* use simple_bind

* replave simple bind in quantization

* fix aux index

* update amp simple_bind calls

* drop ifft

* fix a bug found in subgraph op

* add aux_array method

* replace symbols

* minor fix

* fix executor default context

* fix import

* bug fix for nd.where

* add subgraph test

* fix forward grad req

* fix batch dot dtype

* remove unused code

* fix slice dtype

* fix attach grad

* remove tests for non-existing sparse ops

* MXCachedOpGetOptimizedSymbol

* fix foreach test

* enhance err msg

* skip failed test

* add docs

* add docs

* fix lint

* fix lint, remove quantization

* fix lint

* fix lint

* fix lint

* fix build and import

* fix import

* remove scala, R, julia, perl bindings

* remove cpp, matlab bindings

* fix perl call

* fix test

* remove perl binding

* remove reshape test

* fix profiler, trt

* remove tensorrt test

* remove quantization tests

* fix import

* fix conflcit

* fix lint

* skip buggy test

* remove clojure

* remove executor c api

* remove amalgamation

* fix build

* move executor folder

* fix import

* fix lint

* fix cpp pcakge

* fix predict cpp

* fix cpp make

* remove jnilint

* remove cpp package tset

* remove julia test pipeline

* disable numpy tests

* disable compat test for delete

Co-authored-by: EC2 Default User <ec2-user@ip-172-31-81-80.ec2.internal>
Co-authored-by: Lin <haibilin@a483e7be4c92.ant.amazon.com>
  • Loading branch information
3 people committed Jun 22, 2020
1 parent c1098aa commit 2fbec60
Show file tree
Hide file tree
Showing 719 changed files with 141 additions and 99,737 deletions.
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -898,19 +898,11 @@ if(INSTALL_PYTHON_VERSIONS)
endforeach()
endif()

if(USE_CPP_PACKAGE)
add_subdirectory(cpp-package)
target_compile_definitions(mxnet PUBLIC MXNET_USE_CPP_PACKAGE=1)
if(BUILD_CPP_EXAMPLES)
add_subdirectory(example/image-classification/predict-cpp)
endif()
endif()

add_subdirectory(tests)

# ---[ Linter target
find_package(Python3)
set(LINT_DIRS "include src plugin cpp-package tests")
set(LINT_DIRS "include src plugin tests")
set(EXCLUDE_PATH "src/operator/contrib/ctc_include")
add_custom_target(mxnet_lint COMMAND ${CMAKE_COMMAND} -DMSVC=${MSVC} -DPYTHON_EXECUTABLE=${Python3_EXECUTABLE} -DLINT_DIRS=${LINT_DIRS} -DPROJECT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DPROJECT_NAME=mxnet -DEXCLUDE_PATH=${EXCLUDE_PATH} -P ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/cmake/lint.cmake)

Expand Down
44 changes: 5 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ ifndef DLPACK_PATH
DLPACK_PATH = $(ROOTDIR)/3rdparty/dlpack
endif

ifndef AMALGAMATION_PATH
AMALGAMATION_PATH = $(ROOTDIR)/amalgamation
endif

ifndef TVM_PATH
TVM_PATH = $(TPARTYDIR)/tvm
endif
Expand Down Expand Up @@ -463,7 +459,7 @@ ifeq ($(USE_DIST_KVSTORE), 1)
LDFLAGS += $(PS_LDFLAGS_A)
endif

.PHONY: clean all extra-packages test lint clean_all rcpplint rcppexport roxygen\
.PHONY: clean all extra-packages test lint clean_all roxygen\
cython3 cython cyclean

all: lib/libmxnet.a lib/libmxnet.so $(BIN) extra-packages extension_libs
Expand Down Expand Up @@ -663,23 +659,17 @@ $(BIN) :
@mkdir -p $(@D)
$(CXX) $(CFLAGS) -std=c++17 -o $@ $(filter %.cpp %.o %.c %.a %.cc, $^) $(LDFLAGS)

# CPP Package
ifeq ($(USE_CPP_PACKAGE), 1)
include cpp-package/cpp-package.mk
CFLAGS += -DMXNET_USE_CPP_PACKAGE=1
endif

include mkldnn.mk
include tests/cpp/unittest.mk

extra-packages: $(EXTRA_PACKAGES)

test: $(TEST)

lint: cpplint rcpplint jnilint pylint
lint: cpplint pylint

cpplint:
3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin cpp-package tests \
3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin tests \
--exclude_path src/operator/contrib/ctc_include include/mkldnn

pylint:
Expand Down Expand Up @@ -727,28 +717,6 @@ cython3:
cyclean:
rm -rf python/mxnet/*/*.so python/mxnet/*/*.cpp

scalaclean:
(cd $(ROOTDIR)/scala-package && mvn clean)

scalapkg:
(cd $(ROOTDIR)/scala-package && mvn install -DskipTests)

scalainstall:
(cd $(ROOTDIR)/scala-package && mvn install)

scalaunittest:
(cd $(ROOTDIR)/scala-package && mvn install)

scalaintegrationtest:
(cd $(ROOTDIR)/scala-package && mvn integration-test -DskipTests=false)

jnilint:
3rdparty/dmlc-core/scripts/lint.py mxnet-jnicpp cpp scala-package/native/src --exclude_path scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h

rclean:
$(RM) -r R-package/src/image_recordio.h R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
R-package/inst R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz

build/rat/apache-rat-0.13/apache-rat-0.13.jar:
mkdir -p build/rat
cd build/rat; \
Expand All @@ -770,25 +738,23 @@ ratcheck: build/rat/apache-rat-0.13/apache-rat-0.13.jar


ifneq ($(EXTRA_OPERATORS),)
clean: rclean cyclean $(EXTRA_PACKAGES_CLEAN)
clean: cyclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin deps *~ */*~ */*/*~ */*/*/*~
(cd scala-package && mvn clean) || true
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
cd $(TVM_PATH); $(MAKE) clean; cd -
cd $(AMALGAMATION_PATH); $(MAKE) clean; cd -
$(RM) -r $(patsubst %, %/*.d, $(EXTRA_OPERATORS)) $(patsubst %, %/*/*.d, $(EXTRA_OPERATORS))
$(RM) -r $(patsubst %, %/*.o, $(EXTRA_OPERATORS)) $(patsubst %, %/*/*.o, $(EXTRA_OPERATORS))
else
clean: rclean mkldnn_clean cyclean testclean $(EXTRA_PACKAGES_CLEAN)
clean: mkldnn_clean cyclean testclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~
(cd scala-package && mvn clean) || true
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
cd $(TVM_PATH); $(MAKE) clean; cd -
cd $(AMALGAMATION_PATH); $(MAKE) clean; cd -
endif

clean_all: clean
Expand Down
8 changes: 0 additions & 8 deletions R-package/.Rbuildignore

This file was deleted.

10 changes: 0 additions & 10 deletions R-package/.gitignore

This file was deleted.

36 changes: 0 additions & 36 deletions R-package/DESCRIPTION

This file was deleted.

202 changes: 0 additions & 202 deletions R-package/LICENSE

This file was deleted.

Loading

0 comments on commit 2fbec60

Please sign in to comment.