internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: cupy/cupy

Issue:
JIT: Obscure function signature in the documentation
For example: 
https://docs.cupy.dev/en/latest/reference/generated/cupyx.jit.shfl_up_sync.html
<img width="785" alt="截圖 2021-06-23 下午12 33 32" src="https://user-images.githubusercontent.com/5534781/123134866-3a2c7980-d41f-11eb-96ce-e21e4fe0c1bd.png">
The function signature here reveals no information other than the internal object `WarpShuffleOp` (which we don't want to expose). Ideally Sphinx would take the function signature of `__call__` and display it, but for some reason it is not working properly...This happens in most of objects under `cupyx.jit`.


Discussion:

Resolving patch:
diff --git a/cupyx/jit/_builtin_funcs.py b/cupyx/jit/_builtin_funcs.py
--- a/cupyx/jit/_builtin_funcs.py
+++ b/cupyx/jit/_builtin_funcs.py
@@ -58,6 +58,7 @@ def call(self, env, *args, **kwargs):
 
 
 class LenFunc(BuiltinFunc):
+
     def call(self, env, *args, **kwds):
         if len(args) != 1:
             raise TypeError(f'len() expects only 1 argument, got {len(args)}')
@@ -73,6 +74,7 @@ def call(self, env, *args, **kwds):
 
 
 class MinFunc(BuiltinFunc):
+
     def call(self, env, *args, **kwds):
         if len(args) < 2:
             raise TypeError(
@@ -84,6 +86,7 @@ def call(self, env, *args, **kwds):
 
 
 class MaxFunc(BuiltinFunc):
+
     def call(self, env, *args, **kwds):
         if len(args) < 2:
             raise TypeError(
@@ -147,7 +150,7 @@ def call(self, env, *, mask=None):
 class SharedMemory(BuiltinFunc):
 
     def __call__(self, dtype, size):
-        """Allocates shared memory and returns the 1-dim array.
+        """Allocates shared memory and returns a 1-D array.
 
         Args:
             dtype (dtype):
diff --git a/cupyx/jit/_internal_types.py b/cupyx/jit/_internal_types.py
--- a/cupyx/jit/_internal_types.py
+++ b/cupyx/jit/_internal_types.py
@@ -56,6 +56,9 @@ def __init__(self, start, stop, step, ctype, step_is_positive):
 
 
 class BuiltinFunc(Expr):
+    # subclasses must implement:
+    # - either call or call_const
+    # - `__call__` with a correct signature, which calls the parent's __call__
 
     def call(self, env, *args, **kwargs):
         for x in itertools.chain(args, kwargs.values()):
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -482,5 +482,11 @@ def remove_array_api_module_docstring(app, what, name, obj, options, lines):
     if what == "module" and 'array_api' in name:
         del lines[:]
 
+def fix_jit_callable_signature(
+        app, what, name, obj, options, signature, return_annotation):
+    if 'cupyx.jit' in name and callable(obj) and signature is None:
+        return (f'{inspect.signature(obj)}', None)
+
 def setup(app):
     app.connect("autodoc-process-docstring", remove_array_api_module_docstring)
+    app.connect("autodoc-process-signature", fix_jit_callable_signature)


Test patch:
Repository: cupy/cupy

Issue:
matmul with out=in doesn't raise an exception
Hello, sorry if I'm not following a template but I don't really have time. Just a quick remark to say that in the doc of cupy.matmul:

https://docs.cupy.dev/en/stable/reference/generated/cupy.matmul.html

there's a note "The out array as input is currently not supported.". Indeed I tried it and it doesn't give the right result, but I'm surprised I was able to try it without getting any exception or at least warning. I think this is a bit dangerous...

Thanks,

Camille


Discussion:
Thanks for your reporting! It seems that it was already fixed in https://github.com/cupy/cupy/pull/6216. We will remove this note from the documentation. (cc: @toslunar)

Resolving patch:
diff --git a/cupy/linalg/_product.py b/cupy/linalg/_product.py
--- a/cupy/linalg/_product.py
+++ b/cupy/linalg/_product.py
@@ -25,9 +25,6 @@
     The main difference against cupy.dot are the handling of arrays with more
     than 2 dimensions. For more information see :func:`numpy.matmul`.
 
-    .. note::
-        The out array as input is currently not supported.
-
     Args:
         x1 (cupy.ndarray): The left argument.
         x2 (cupy.ndarray): The right argument.


Test patch:
Repository: cupy/cupy

Issue:
`cupy.clip` behave differently from NumPy
### Description

The behavior is different from NumPy when

* only `a_max` or `a_min` is given
* `a_max` < `a_min`

### To Reproduce

CuPy:
```py
>>> import cupy as cp
>>> cp.clip(cp.arange(8), a_min=3, a_max=6)
array([3, 3, 3, 3, 4, 5, 6, 6])
>>> cp.clip(cp.arange(8), a_min=3)
array([3, 3, 3, 3, 4, 5, 6, 7])
>>> cp.clip(cp.arange(8), a_max=3)
array([0, 1, 2, 3, 3, 3, 3, 3])
>>> cp.clip(cp.arange(8), a_min=6, a_max=3)
array([6, 6, 6, 6, 6, 6, 3, 3])
```

NumPy:
```py
>>> import numpy as np
>>> np.clip(np.arange(8), a_min=3, a_max=6)
array([3, 3, 3, 3, 4, 5, 6, 6])
>>> np.clip(np.arange(8), a_min=3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<__array_function__ internals>", line 179, in clip
TypeError: _clip_dispatcher() missing 1 required positional argument: 'a_max'
>>> np.clip(np.arange(8), a_max=3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<__array_function__ internals>", line 179, in clip
TypeError: _clip_dispatcher() missing 1 required positional argument: 'a_min'
>>> np.clip(np.arange(8), a_min=6, a_max=3)
array([3, 3, 3, 3, 3, 3, 3, 3])
```

### Installation

_No response_

### Environment

_No response_

### Additional Information

_No response_


Discussion:
Will take this up.

Resolving patch:
diff --git a/cupy/_math/misc.py b/cupy/_math/misc.py
--- a/cupy/_math/misc.py
+++ b/cupy/_math/misc.py
@@ -144,7 +144,7 @@ def _dot_convolve(a1, a2, mode):
     return output
 
 
-def clip(a, a_min=None, a_max=None, out=None):
+def clip(a, a_min, a_max, out=None):
     """Clips the values of an array to a given interval.
 
     This is equivalent to ``maximum(minimum(a, a_max), a_min)``, while this
@@ -163,6 +163,10 @@ def clip(a, a_min=None, a_max=None, out=None):
 
     .. seealso:: :func:`numpy.clip`
 
+    Notes
+    -----
+    When `a_min` is greater than `a_max`, `clip` returns an
+    array in which all values are equal to `a_max`.
     """
     if fusion._is_fusing():
         return fusion._call_ufunc(_math.clip,


Test patch:
diff --git a/tests/cupy_tests/math_tests/test_misc.py b/tests/cupy_tests/math_tests/test_misc.py
--- a/tests/cupy_tests/math_tests/test_misc.py
+++ b/tests/cupy_tests/math_tests/test_misc.py
@@ -132,6 +132,19 @@ def test_external_clip2(self, xp, dtype):
         a = testing.shaped_arange((2, 3, 4), xp, dtype)
         return xp.clip(a, 3, 13)
 
+    @testing.for_all_dtypes(no_bool=True, no_complex=True)
+    @testing.numpy_cupy_array_equal()
+    def test_external_clip3(self, xp, dtype):
+        a = testing.shaped_arange((2, 3, 4), xp, dtype)
+        return xp.clip(a, 8, 4)
+
+    @testing.for_all_dtypes(no_bool=True, no_complex=True)
+    def test_external_clip4(self, dtype):
+        for xp in (numpy, cupy):
+            a = testing.shaped_arange((2, 3, 4), xp, dtype)
+            with pytest.raises(TypeError):
+                xp.clip(a, 3)
+
     @testing.for_all_dtypes(no_complex=True)
     @testing.numpy_cupy_array_equal()
     def test_clip2(self, xp, dtype):
Repository: cupy/cupy

Issue:
Some cupy.random distribution does not support `size=None`
`size=None` is different from `size=()`.
```
>>> np.random.uniform([2], [[3]])
array([[2.63150331]])
>>> np.random.uniform([2], [[3]], size=())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mtrand.pyx", line 1317, in mtrand.RandomState.uniform
  File "mtrand.pyx", line 267, in mtrand.cont2_array
ValueError: size is not compatible with inputs
>>> 
>>> cupy.random.uniform([2], [[3]])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kataoka/cupy/cupy/random/distributions.py", line 454, in uniform
    return rs.uniform(low, high, size=size, dtype=dtype)
  File "/home/kataoka/cupy/cupy/random/generator.py", line 484, in uniform
    return RandomState._scale_kernel(low, high, rand)
  File "cupy/core/_kernel.pyx", line 532, in cupy.core._kernel.ElementwiseKernel.__call__
    out_args = _get_out_args_with_params(
  File "cupy/core/_kernel.pyx", line 368, in cupy.core._kernel._get_out_args_with_params
    raise ValueError('Out shape is mismatched')
ValueError: Out shape is mismatched
```


Discussion:

Resolving patch:
diff --git a/cupy/random/_generator.py b/cupy/random/_generator.py
--- a/cupy/random/_generator.py
+++ b/cupy/random/_generator.py
@@ -915,12 +915,16 @@ def uniform(self, low=0.0, high=1.0, size=None, dtype=float):
             - :meth:`numpy.random.RandomState.uniform`
 
         """
-        dtype = numpy.dtype(dtype)
-        rand = self.random_sample(size=size, dtype=dtype)
         if not numpy.isscalar(low):
             low = cupy.asarray(low, dtype)
         if not numpy.isscalar(high):
             high = cupy.asarray(high, dtype)
+
+        if size is None:
+            size = cupy.broadcast(low, high).shape
+
+        dtype = numpy.dtype(dtype)
+        rand = self.random_sample(size=size, dtype=dtype)
         return RandomState._scale_kernel(low, high, rand)
 
     def vonmises(self, mu, kappa, size=None, dtype=float):


Test patch:
diff --git a/tests/cupy_tests/random_tests/test_generator.py b/tests/cupy_tests/random_tests/test_generator.py
--- a/tests/cupy_tests/random_tests/test_generator.py
+++ b/tests/cupy_tests/random_tests/test_generator.py
@@ -1017,6 +1017,9 @@ def test_uniform_1(self):
     def test_uniform_2(self):
         self.generate(-4.2, 2.4, size=(3, 2))
 
+    def test_uniform_broadcast(self):
+        self.generate([[2, 3]], [4])
+
     @testing.for_dtypes('fd')
     @_condition.repeat_with_success_at_least(10, 3)
     def test_uniform_ks_1(self, dtype):
Repository: cupy/cupy

Issue:
CG example: Matrix may not fulfil requirements of algorithm
### Description

For the CG algorithm to converge it is necessary for the matrix to be symmetric and positive definite, see the definition on [wikipedia](https://en.wikipedia.org/wiki/Definite_matrix). Otherwise it's not guaranteed that the inner products formed in the algorithm are non-zero and that the successive updates bring the iterate
closer to the solution. To fix this `A + A.T` must be changed to `A @ A.T`. Then, the result is symmetric and positive definite with probability one.

### To Reproduce

```py
# Comments show a typical output. The actual output varies from call to call.
import numpy, scipy
N = 2
A = numpy.random.randint(-50, 50, size=(N, N))
# array([[  2, -18],
#      [-50, -20]])
scipy.linalg.eigvals(A + A.T)
# array([ 53.47027354+0.j, -89.47027354+0.j])
scipy.linalg.eigvals(A @ A.T)
# array([ 301.98018308+0.j, 2926.01981692+0.j]
```


### Installation

Source (`pip install cupy`)

### Environment

```
OS                        : Linux-5.18.14-xanmod1-1-native_amd-x86_64-with-glibc2.35
Python Version            : 3.10.5
CuPy Version              : 11.0.0
CuPy Platform             : AMD ROCm
NumPy Version             : 1.23.1
SciPy Version             : 1.9.0
Cython Build Version      : 0.29.32
Cython Runtime Version    : 0.29.32
CUDA Root                 : /opt/rocm
hipcc PATH                : /opt/rocm/bin/hipcc
CUDA Build Version        : 50221152
CUDA Driver Version       : 50221152
CUDA Runtime Version      : 50221152
cuBLAS Version            : (available)
cuFFT Version             : 10017
cuRAND Version            : 201009
cuSOLVER Version          : (3, 18, 0)
cuSPARSE Version          : (available)
NVRTC Version             : (9, 0)
Thrust Version            : 101500
CUB Build Version         : 201012
Jitify Build Version      : None
cuDNN Build Version       : None
cuDNN Version             : None
NCCL Build Version        : 21104
NCCL Runtime Version      : 21104
cuTENSOR Version          : None
cuSPARSELt Build Version  : None
Device 0 Name             : AMD Radeon RX Vega
Device 0 Arch             : gfx900:xnack-
Device 0 PCI Bus ID       : 0000:29:00.0
```


### Additional Information

_No response_


Discussion:

Resolving patch:
diff --git a/examples/cg/cg.py b/examples/cg/cg.py
--- a/examples/cg/cg.py
+++ b/examples/cg/cg.py
@@ -52,7 +52,7 @@ def run(gpu_id, tol, max_iter):
         # Create the large symmetric matrix 'A'.
         N = 2000
         A = np.random.randint(-50, 50, size=(N, N))
-        A = (A + A.T).astype(np.float64)
+        A = (A @ A.T).astype(np.float64)
         x_ans = np.random.randint(-50, 50, size=N).astype(np.float64)
         b = np.dot(A, x_ans)
 


Test patch:
Repository: cupy/cupy

Issue:
Exception raised in `TCPStore.__del__` upon process termination
### Description

`__del__` should not perform syncronization when called during process termination.

```
Exception ignored in: <function TCPStore.__del__ at 0x7fb939be23a0>
Traceback (most recent call last):
  File "/home/maehashi/Development/cupy/cupyx/distributed/_store.py", line 49, in __del__
  File "/home/maehashi/Development/cupy/cupyx/distributed/_store.py", line 97, in stop
  File "/home/maehashi/Development/cupy/cupyx/distributed/_store.py", line 31, in join
  File "/home/maehashi/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/connection.py", line 251, in recv
ModuleNotFoundError: import of builtins halted; None in sys.modules
```

### To Reproduce

_No response_

### Installation

_No response_

### Environment

_No response_

### Additional Information

_No response_


Discussion:

Resolving patch:
diff --git a/cupyx/distributed/_store.py b/cupyx/distributed/_store.py
--- a/cupyx/distributed/_store.py
+++ b/cupyx/distributed/_store.py
@@ -1,3 +1,4 @@
+import atexit
 from ctypes import sizeof
 import multiprocessing
 import threading
@@ -11,6 +12,14 @@
 _DEFAULT_HOST = '127.0.0.1'
 _DEFAULT_PORT = 13333
 
+_exit_mode = False
+
+
+@atexit.register
+def _exit():
+    global _exit_mode
+    _exit_mode = True
+
 
 class ExceptionAwareProcess(multiprocessing.Process):
     def __init__(self, *args, **kwargs):
@@ -46,7 +55,8 @@ def __init__(self, world_size):
         self._current_barrier = None
 
     def __del__(self):
-        self.stop()
+        if not _exit_mode:
+            self.stop()
 
     def _set_process(self, process):
         self._process = process
@@ -91,6 +101,8 @@ def run(self, host=_DEFAULT_HOST, port=_DEFAULT_PORT):
         self._process = p
 
     def stop(self):
+        if _exit_mode:
+            return  # Prevent shutdown errors
         if self._process is not None:
             with self._run.get_lock():
                 self._run.value = 0


Test patch:
Repository: cupy/cupy

Issue:
Typo in raise from einsum
### Description

In this line:

https://github.com/cupy/cupy/blob/master/cupy/linalg/_einsum.py#L511

einsum() tries to raise an error:

```py
raise TypeError('Did not understand the following kwargs: %s'
                        % list(kwargs.keys))
```

but I believe it should be `list(kwargs.keys())` or simply `list(kwargs)`.


### To Reproduce

```py
>>> cp.einsum('i', cp.ones(7), asdf=42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/camp/jensj/venv/lib64/python3.9/site-packages/cupy/linalg/_einsum.py", line 512, in einsum
    % list(kwargs.keys))
TypeError: 'builtin_function_or_method' object is not iterable
```


### Installation

_No response_

### Environment

```
OS                           : Linux-4.18.0-372.26.1.el8_6.x86_64-x86_64-with-glibc2.28
Python Version               : 3.9.13
CuPy Version                 : 11.3.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 1.23.5
SciPy Version                : 1.9.3
Cython Build Version         : 0.29.32
Cython Runtime Version       : None
CUDA Root                    : /usr/local/cuda
nvcc PATH                    : /usr/local/cuda/bin/nvcc
CUDA Build Version           : 11080
CUDA Driver Version          : 11080
CUDA Runtime Version         : 11080
cuBLAS Version               : (available)
cuFFT Version                : 10900
cuRAND Version               : 10300
cuSOLVER Version             : (11, 4, 1)
cuSPARSE Version             : (available)
NVRTC Version                : (11, 8)
Thrust Version               : 101501
CUB Build Version            : 101501
Jitify Build Version         : <unknown>
cuDNN Build Version          : None
cuDNN Version                : None
NCCL Build Version           : None
NCCL Runtime Version         : None
cuTENSOR Version             : None
cuSPARSELt Build Version     : None
Device 0 Name                : Quadro RTX 4000
Device 0 Compute Capability  : 75
Device 0 PCI Bus ID          : 0000:21:00.0
```


### Additional Information

_No response_


Discussion:
Thanks! Do you have interest in posting a pull request to fix this?
I'll do that.

Resolving patch:
diff --git a/cupy/linalg/_einsum.py b/cupy/linalg/_einsum.py
--- a/cupy/linalg/_einsum.py
+++ b/cupy/linalg/_einsum.py
@@ -509,7 +509,7 @@ def einsum(*operands, **kwargs):
         optimize = 'greedy'
     if kwargs:
         raise TypeError('Did not understand the following kwargs: %s'
-                        % list(kwargs.keys))
+                        % list(kwargs.keys()))
 
     result_dtype = cupy.result_type(*operands) if dtype is None else dtype
     operands = [


Test patch:
Repository: cupy/cupy

Issue:
Support for xp.take?
### Description

worth adding xp.take from array api standard:
https://data-apis.org/array-api/latest/API_specification/generated/array_api.take.html#array_api.take

I've landed a PR to numpy, I think implementation in cupy is the same?
https://github.com/numpy/numpy/pull/23284/files

### Additional Information

_No response_


Discussion:
Thanks, but do you mean this or something else?
https://docs.cupy.dev/en/stable/reference/generated/cupy.take.html
I believe Alex meant to add `cupy.array_api.take()`. Alex, if you have time to help us it couldn't be better, otherwise, we can take care of it after your NumPy PR is merged. 

This is what we've been doing so far: We usually wait until the PR lands in NumPy ("landing" as in "merged", not just "in progress/in review" 🙂), and then take the patch from the NumPy PR and apply it to CuPy with authorship preserved (in some cases the patches would need convolved editing to fit in CuPy that this process could fail and require manual intervention, especially with regard to device/stream management). 

Resolving patch:
diff --git a/cupy/array_api/__init__.py b/cupy/array_api/__init__.py
--- a/cupy/array_api/__init__.py
+++ b/cupy/array_api/__init__.py
@@ -340,6 +340,10 @@
     "trunc",
 ]
 
+from ._indexing_functions import take
+
+__all__ += ["take"]
+
 # linalg is an extension in the array API spec, which is a sub-namespace. Only
 # a subset of functions in it are imported into the top-level namespace.
 from . import linalg
diff --git a/cupy/array_api/_indexing_functions.py b/cupy/array_api/_indexing_functions.py
new file mode 100644
--- /dev/null
+++ b/cupy/array_api/_indexing_functions.py
@@ -0,0 +1,17 @@
+from __future__ import annotations
+
+from ._array_object import Array
+from ._dtypes import _integer_dtypes
+
+import cupy as np
+
+def take(x: Array, indices: Array, /, *, axis: int) -> Array:
+    """
+    Array API compatible wrapper for :py:func:`np.take <numpy.take>`.
+    See its docstring for more information.
+    """    
+    if indices.dtype not in _integer_dtypes:
+        raise TypeError("Only integer dtypes are allowed in indexing")
+    if indices.ndim != 1: 
+        raise ValueError("Only 1-dim indices array is supported")
+    return Array._new(np.take(x._array, indices._array, axis=axis))


Test patch:
diff --git a/tests/cupy_tests/array_api_tests/test_indexing_functions.py b/tests/cupy_tests/array_api_tests/test_indexing_functions.py
new file mode 100644
--- /dev/null
+++ b/tests/cupy_tests/array_api_tests/test_indexing_functions.py
@@ -0,0 +1,22 @@
+import pytest
+
+from cupy import array_api as xp
+
+
+@pytest.mark.parametrize(
+    "obj, ind, axis, expected",
+    [
+        ([0, 1, 2, 3], [1, 3], -1, [1, 3]),
+        ([0, 1, 2, 3], [2, 0], 0, [2, 0]),
+        ([[0, 1, 2, 3]], [0, 0, 0], 0, [[0, 1, 2, 3]] * 3),
+        ([[0, 1, 2, 3]], [1, 2, 1], 1, [[1, 2, 1]]),
+    ],
+)
+def test_take(obj, ind, axis, expected):
+    """
+    Tests xp.take function
+    """
+    x = xp.asarray(obj)
+    ind = xp.asarray(ind)
+    out = xp.take(x, ind, axis=axis)
+    assert xp.all(out == xp.asarray(expected))
Repository: cupy/cupy

Issue:
[RFC] Renaming the development branch to `main` 
Now that many projects around the scientific Python community converged to use `main` as the default branch for their repositories, I think it could make sense to do that for CuPy too.

According to https://github.com/github/renaming, side-effects of renaming a branch are very limited and I believe that it is less likely to cause confusion:

- Re-target any open pull requests
- Update any draft releases based on the branch
- Move any branch protection rules that explicitly reference the old name
- Update the branch used to build GitHub Pages, if applicable
- Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository
- Show a notice to contributors who `git push` to the old branch
- Redirect web requests for the old branch name to the new branch name
- Return a "Moved Permanently" response in API requests for the old branch name


Discussion:
Perhaps this can be done ~~when~~ right after CuPy v12.0.0 is released?
Once we agreed, I think just after the RC would be a good timing - cut branch for v12 and start dev on `main` for v13.
Ah yes I forgot that the branch is forked at the RC, not after a new major ver is out, it's better!

Resolving patch:
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -28,7 +28,7 @@
 
 rtd_version = os.environ.get('READTHEDOCS_VERSION')
 if rtd_version == 'latest':
-    tag = 'master'
+    tag = 'main'
 else:
     tag = 'v{}'.format(__version__)
 extlinks = {


Test patch:
diff --git a/.pfnci/linux/tests/actions/benchmark.sh b/.pfnci/linux/tests/actions/benchmark.sh
--- a/.pfnci/linux/tests/actions/benchmark.sh
+++ b/.pfnci/linux/tests/actions/benchmark.sh
@@ -12,7 +12,7 @@ python3 prof.py benchmarks/bench_ufunc_cupy.py -c
 mkdir target
 mv *.csv target/
 
-# Run benchmarks for master branch
+# Run benchmarks for main branch
 # Since GCP instance may change and use diff gen processsors/GPUs
 # we just recompile and run to avoid false errors
 python3 -m pip uninstall -y cupy
@@ -23,10 +23,10 @@ if [[ "${PULL_REQUEST:-}" == "" ]]; then
     # For branches we compare against the latest release
     # TODO(ecastill) find a programatical way of doing this
     # sorting tags, or just checking the dates may mix the
-    # stable & master branches
+    # stable & main branches
     git checkout tags/v11.0.0a2 -b v11.0.0a2
 else
-    git checkout master
+    git checkout main
 fi
 git submodule update --init
 python3 -m pip install --user -v .