mirror of
https://github.com/wassname/ray.git
synced 2026-08-14 12:40:23 +08:00
[serve] Add docs on configuring cv2 parallelism (#12652)
This commit is contained in:
@@ -81,6 +81,12 @@ If you *do* want to enable this parallelism in your Serve backend, just set OMP_
|
||||
|
||||
client.create_backend("parallel_backend", MyBackend, 12)
|
||||
|
||||
|
||||
.. note::
|
||||
Some other libraries may not respect ``OMP_NUM_THREADS`` and have their own way to configure parallelism.
|
||||
For example, if you're using OpenCV, you'll need to manually set the number of threads using ``cv2.setNumThreads(num_threads)`` (set to 0 to disable multi-threading).
|
||||
You can check the configuration using ``cv2.getNumThreads()`` and ``cv2.getNumberOfCPUs()``.
|
||||
|
||||
.. _serve-batching:
|
||||
|
||||
Batching to improve performance
|
||||
|
||||
Reference in New Issue
Block a user