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
This is a short, neutral summary mostly saying that the whole
topic is out of scope for this version of the standard, and
referring to the relevant GitHub issue for more details for
those who are interested.
Parallelism is mostly, but not completely, an execution or runtime concern
4
+
rather than an API concern. Execution semantics are out of scope for this API
5
+
standard, and hence won't be discussed further here. The API related part
6
+
involves how libraries allow users to exercise control over the parallelism
7
+
they offer, such as:
8
+
9
+
- Via environment variables. This is the method of choice for BLAS libraries and libraries using OpenMP.
10
+
- Via a keyword to individual functions or methods. Examples include the `n_jobs` keyword used in scikit-learn and the `workers` keyword used in SciPy.
11
+
- Build-time settings to enable a parallel or distributed backend.
12
+
- Via letting the user set chunk sizes. Dask uses this approach.
13
+
14
+
When combining multiple libraries, one has to deal with auto-parallelization
15
+
semantics and nested parallelism. Two things that could help improve the
16
+
coordination of parallelization behavior in a stack of Python libraries are:
17
+
18
+
1. A common API pattern for enabling parallelism
19
+
2. A common library providing a parallelization layer
20
+
21
+
Option (1) may possibly fit in a future version of this array API standard.
0 commit comments