@@ -53,7 +53,7 @@ In order to write native Kokkos in Python, see [pykokkos](https://github.com/kok
5353
5454## Installation
5555
56- You can install this package via CMake or Python's ` setup.py ` . The important cmake options are:
56+ You can install this package via CMake or via ` pip install ./ ` . The important CMake options are:
5757
5858- ` ENABLE_VIEW_RANKS ` (integer)
5959- ` ENABLE_LAYOUTS ` (bool)
@@ -82,8 +82,7 @@ If the `ENABLE_INTERNAL_KOKKOS` option is not specified the first time CMake is
8282find an existing Kokkos installation. If no existing installation is found, it will build and install
8383Kokkos from a submodule. When Kokkos is added as a submodule, you can configure the submodule
8484as you would normally configure Kokkos. However, due to some general awkwardness configuring cmake
85- from ` setup.py ` (especially via ` pip install ` ), CMake tries to "automatically" configure
86- reasonable default CMake settings for the Kokkos submodule.
85+ when configuring via pip builds, CMake tries to "automatically" configure reasonable default CMake settings for the Kokkos submodule.
8786
8887Here are the steps when Kokkos is added as a submodule:
8988
@@ -108,28 +107,10 @@ Here are the steps when Kokkos is added as a submodule:
108107cmake -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF /path/to/source
109108```
110109
111- ### Configuring Options via ` setup.py `
110+ ### Configuring Options
112111
113- There are three ways to configure the options:
114-
115- 1 . Via the Python argparse options ` --enable-<option> ` and ` --disable-<option> `
116- 2 . Setting the ` PYKOKKOS_BASE_SETUP_ARGS ` environment variable to the CMake options
117- 3 . Passing in the CMake options after a ` -- `
118-
119- All three lines below are equivalent (deprecated format):
120-
121- ``` console
122- python setup.py install --enable-layouts --disable-memory-traits
123- PYKOKKOS_BASE_SETUP_ARGS="-DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF" python setup.py install
124- python setup.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF
125- ```
126-
127- ### Configuring Options via ` pip `
128-
129- Pip does not handle build options well. Thus, it is recommended to use the ` PYKOKKOS_BASE_SETUP_ARGS `
130- environment variable noted above.
131-
132- We suggest using the following line to install pykokkos-base:
112+ For pip installs, set ` PYKOKKOS_BASE_SETUP_ARGS ` to a space-delimited list of CMake ` -D... `
113+ options, then run:
133114
134115```
135116PYKOKKOS_BASE_SETUP_ARGS="-DKokkos_ENABLE_THREADS=OFF \
@@ -143,8 +124,7 @@ PYKOKKOS_BASE_SETUP_ARGS="-DKokkos_ENABLE_THREADS=OFF \
143124
144125` --verbose ` is optional, but it shows installation progress in real time.
145126
146- > ` pip install ./ ` will build against the latest release in the PyPi repository.
147- > In order to pip install from this repository, use ` pip install --user -e . `
127+ > ` pip install ./ ` installs from this checkout. For editable development, use ` pip install -e . ` .
148128
149129## Differences vs. Kokkos C++
150130
0 commit comments