Remove plugin, cuda related code in automake & autoconf files (#4789)

* Build plugin example with CMake.

* Remove plugin, cuda related code in automake & autoconf files.

* Fix typo in GPU doc.
This commit is contained in:
Jiaming Yuan
2019-08-18 16:54:34 -04:00
committed by GitHub
parent c358d95c44
commit ab357dd41c
17 changed files with 56 additions and 94 deletions

View File

@@ -1,21 +1,19 @@
XGBoost Plugin Example
======================
This folder provides an example of xgboost plugin.
This folder provides an example of implementing xgboost plugin.
There are three steps you need to do to add a plugin to xgboost
- Create your source .cc file, implement a new extension
- In this example [custom_obj.cc](custom_obj.cc)
- Register this extension to xgboost via a registration macro
- In this example ```XGBOOST_REGISTER_OBJECTIVE``` in [this line](custom_obj.cc#L75)
- Create a [plugin.mk](plugin.mk) on this folder
To add this plugin, add the following line to ```config.mk```(template in make/config.mk).
```makefile
# Add plugin by include the plugin in config
XGB_PLUGINS += plugin/plugin_a/plugin.mk
- In this example ```XGBOOST_REGISTER_OBJECTIVE``` in [this line](custom_obj.cc#L78)
- Add a line to `xgboost/plugin/CMakeLists.txt`:
```
set(PLUGINS_SOURCES ${PLUGINS_SOURCES}
${xgboost_SOURCE_DIR}/plugin/example/custom_obj.cc PARENT_SCOPE)
```
Then you can test this plugin by using ```objective=mylogistic``` parameter.
<!-- LocalWords: XGBoost
-->

View File

@@ -1,4 +0,0 @@
# Add the object files you like to include in this plugin.
PLUGIN_OBJS += build_plugin/example/custom_obj.o
# Add additional dependent libraries this plugin might have
PLUGIN_LDFLAGS +=