Skip to content

Commit 48a9a0a

Browse files
authored
Merge branch 'main' into develop
2 parents aa0c5c7 + 5bd576d commit 48a9a0a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
# Least-Squares Support-Vector Machine   [![Generate documentation](https://github.com/SC-SGS/PLSSVM/actions/workflows/documentation.yml/badge.svg)](https://vancraar.github.io/PLSSVM/)   [![Build Status Linux CPU + GPU](https://simsgs.informatik.uni-stuttgart.de/jenkins/buildStatus/icon?job=PLSSVM%2FMultibranch-Github%2Fmain&subject=Linux+CPU/GPU)](https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Multibranch-Github/job/main/)   [![Windows CPU](https://github.com/SC-SGS/PLSSVM/actions/workflows/msvc_windows.yml/badge.svg)](https://github.com/SC-SGS/PLSSVM/actions/workflows/msvc_windows.yml)
1+
# Least-Squares Support-Vector Machine   [![Codacy Badge](https://app.codacy.com/project/badge/Grade/e780a63075ce40c29c49d3df4f57c2af)](https://www.codacy.com/gh/SC-SGS/PLSSVM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=SC-SGS/PLSSVM&utm_campaign=Badge_Grade)   [![Generate documentation](https://github.com/SC-SGS/PLSSVM/actions/workflows/documentation.yml/badge.svg)](https://vancraar.github.io/PLSSVM/)   [![Build Status Linux CPU + GPU](https://simsgs.informatik.uni-stuttgart.de/jenkins/buildStatus/icon?job=PLSSVM%2FMultibranch-Github%2Fmain&subject=Linux+CPU/GPU)](https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Multibranch-Github/job/main/)   [![Windows CPU](https://github.com/SC-SGS/PLSSVM/actions/workflows/msvc_windows.yml/badge.svg)](https://github.com/SC-SGS/PLSSVM/actions/workflows/msvc_windows.yml)
32

43
Implementation of a parallel [least-squares support-vector machine](https://en.wikipedia.org/wiki/Least-squares_support-vector_machine) using multiple different backends.
54
The currently available backends are:
@@ -36,6 +35,7 @@ Additional dependencies for the SYCL backend:
3635
Additional dependencies if `PLSSVM_ENABLE_TESTING` and `PLSSVM_GENERATE_TEST_FILE` are both set to `ON`:
3736
- [Python3](https://www.python.org/) with the [`argparse`](https://docs.python.org/3/library/argparse.html) and [`sklearn`](https://scikit-learn.org/stable/) modules
3837

38+
3939
### Building
4040

4141
Building the library can be done using the normal CMake approach:
@@ -87,6 +87,7 @@ If the architectural information for the requested GPU could not be retrieved, o
8787
- for NVIDIA GPUs: [Your GPU Compute Capability](https://developer.nvidia.com/cuda-gpus)
8888
- for AMD GPUs: [ROCm Documentation](https://github.com/RadeonOpenCompute/ROCm_Documentation/blob/master/ROCm_Compiler_SDK/ROCm-Native-ISA.rst)
8989

90+
9091
#### Optional CMake Options
9192

9293
The `[optional_options]` can be one or multiple of:
@@ -122,7 +123,6 @@ The `[optional_options]` can be one or multiple of:
122123
If `PLSSVM_ENABLE_TESTING` is set to `ON`, the following options can also be set:
123124
- `PLSSVM_GENERATE_TEST_FILE=ON|OFF` (default: `ON`): automatically generate test files
124125
- `PLSSVM_TEST_FILE_NUM_DATA_POINTS` (default: `5000`): the number of data points in the test file
125-
- `PLSSVM_TEST_FILE_NUM_FEATURES` (default: `2000`): the number of features per data point
126126

127127
If the SYCL backend is available and DPC++ is used, the option `PLSSVM_SYCL_DPCPP_USE_LEVEL_ZERO` can be used to select Level-Zero as the
128128
DPC++ backend instead of OpenCL.
@@ -140,12 +140,14 @@ To run the tests after building the library (with `PLSSVM_ENABLE_TESTING` set to
140140

141141
To enable the generation of test coverage reports using `locv` the library must be compiled using the custom `Coverage` `CMAKE_BUILD_TYPE`.
142142
Additionally, it's advisable to use smaller test files to shorten the `ctest` step.
143+
143144
```bash
144145
> cmake -DCMAKE_BUILD_TYPE=Coverage -DPLSSVM_TARGET_PLATFORMS="..." \
145146
-DPLSSVM_TEST_FILE_NUM_DATA_POINTS=100 \
146147
-DPLSSVM_TEST_FILE_NUM_FEATURES=50 ..
147148
> cmake --build . -- coverage
148149
```
150+
149151
The resulting `html` coverage report is located in the `coverage` folder in the build directory.
150152

151153
### Creating the documentation
@@ -159,6 +161,7 @@ The documentation of the current state of the main branch can be found [here](ht
159161
## Installing
160162

161163
The library supports the `install` target:
164+
162165
```bash
163166
> cmake --build . -- install
164167
```
@@ -236,6 +239,7 @@ Another example targeting NVIDIA GPUs using the SYCL backend looks like:
236239
```
237240
238241
The `--target_platform=automatic` flags works for the different backends as follows:
242+
239243
- `OpenMP`: always selects a CPU
240244
- `CUDA`: always selects an NVIDIA GPU (if no NVIDIA GPU is available, throws an exception)
241245
- `OpenCL`: tries to find available devices in the following order: NVIDIA GPUs 🠦 AMD GPUs 🠦 Intel GPUs 🠦 CPU
@@ -275,6 +279,7 @@ The `--target_platform=automatic` flags works like in the training (`./svm-train
275279
## Example code for usage as library
276280
277281
A simple C++ program (`main.cpp`) using this library could look like:
282+
278283
```cpp
279284
#include "plssvm/core.hpp"
280285

@@ -314,7 +319,9 @@ int main(i) {
314319
return 0;
315320
}
316321
```
322+
317323
With a corresponding minimal CMake file:
324+
318325
```cmake
319326
cmake_minimum_required(VERSION 3.16)
320327
@@ -329,6 +336,7 @@ target_compile_features(prog PUBLIC cxx_std_17)
329336
target_link_libraries(prog PUBLIC plssvm::svm-all)
330337
```
331338
339+
332340
## License
333341
334342
The PLSSVM library is distributed under the MIT [license](https://github.com/SC-SGS/PLSSVM/blob/main/LICENSE.md).

0 commit comments

Comments
 (0)