You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not expose the environment related functions in the Python bindings but automatically handle it during module import and cleanup. NO user action required anymore.
@@ -198,7 +197,6 @@ The following table lists all PLSSVM enumerations exposed on the Python side:
198
197
|`ClassificationType`|`OAA`, `OAO`| The different supported multi-class classification strategies (default: `LIBSVM`). |
199
198
|`BackendType`|`AUTOMATIC`, `OPENMP`, `HPX`, `CUDA`, `HIP`, `OPENCL`, `SYCL`, `KOKKOS`| The different supported backends (default: `AUTOMATIC`). If `AUTOMATIC` is provided, the selected backend depends on the used target platform. |
200
199
|`VerbosityLevel`|`QUIET`, `LIBSVM`, `TIMING`, `FULL`| The different supported log levels (default: `FULL`). `QUIET` means no output, `LIBSVM` output that is as conformant as possible with LIBSVM's output, `TIMING` all timing related outputs, and `FULL` everything. Can be combined via bit-wise operations. |
201
-
|`Status`|`UNINITIALIZED`, `INITIALIZED`, `FINALIZED`, `UNNECESSARY`| The different environment status values. **Note**: located in the `plssvm.environment` module. ||
202
200
203
201
If a SYCL implementation is available, additional enumerations are available:
204
202
@@ -343,9 +341,8 @@ If the most performant backend should be used, it is sufficient to use `plssvm.C
343
341
`sycl_implementation_type` to choose between DPC++ and AdaptiveCpp as SYCL implementations
344
342
and `sycl_kernel_invocation_type` to choose between the two different SYCL kernel invocation types.
345
343
346
-
**Note**: if the backend type is `plssvm.BackendType.HPX` it is necessary to initialize and finalize the HPX runtime.
347
-
The runtime can be manually managed using `plssvm.environment.initialize()` and `plssvm.environment.finalize()`.
348
-
We recommend utilizing `plssvm.environment.ScopeGuard()` to manage the lifetime of the HPX runtime automatically.
344
+
**Note**: if the backend type is `plssvm.BackendType.HPX` or `plssvm.BackendType.Kokkos` special initialization and finalization functions must be called.
345
+
However, this is **automatically** handled by our Python bindings on the module import and cleanup.
|`ScopeGuard([backends={}])`| Create a new scope guard initializing all available backend environments. If a list of backends is provided, only initializes these backends. |
453
-
|`ScopeGuard(argc, argv, [backends={}])`| Create a new scope guard initializing all available backend environments using the provided command line arguments. If a list of backends is provided, only initializes these backends. |
|`list_available_stdpar_implementations()`| List all available stdpar implementations (determined during PLSSVM's build step; currently always guaranteed to be only one implementation). |
551
535
552
-
Additional free functions are available under `plssvm.environment.`.
|`get_backend_status(backend)`| Return the current environment status of the provided backend. |
557
-
|`initialize([backends={}])`| Initialize all available backend environments. If a list of backends is provided, only initializes these backends. |
558
-
|`initialize(argc, argv, [backends={}])`| Initialize all available backend environments using the provided command line arguments. If a list of backends is provided, only initializes these backends. |
559
-
|`finalize([backends={}])`| Finalize all available backend environments. If a list of backends is provided, only finalizes these backends. |
560
-
561
536
### Exceptions
562
537
563
538
The PLSSVM Python3 bindings define a few new exception types:
@@ -576,6 +551,5 @@ The PLSSVM Python3 bindings define a few new exception types:
576
551
|`MatrixError`| If something went wrong in the internal matrix class. **Note**: shouldn't occur in user code. |
577
552
|`KernelLaunchResourcesError`| If something went wrong during a kernel launch due to insufficient ressources. |
578
553
|`ClassificationReportError`| If something in the classification report went wrong. **Note**: shouldn't occur in user code. |
579
-
|`EnvironmentError`| If something during environment initialization or finalization went wrong. |
580
554
581
555
Depending on the available backends, additional `BackendError`s are also available (e.g., `plssvm.cuda.BackendError`).
0 commit comments