Skip to content

Commit 6175aaa

Browse files
authored
Add list of environment variables to readme (#101)
1 parent 47e2874 commit 6175aaa

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,36 @@ Currently only a subset of the Array API is covered by sharpy
141141
- `sharpy.spmd.gather` gathers the distributed array and forms a single, local and contiguous copy of the data as a numpy array
142142
- `sharpy.spmd.get_locals` return the local part of the distributed array as a numpy array
143143
- sharpy allows providing a fallback array implementation. By setting SHARPY_FALLBACK to a python package it will call that package if a given function is not provided by sharpy. It will pass sharpy arrays as (gathered) numpy-arrays.
144+
145+
## Environment variables
146+
147+
### Compile time variables
148+
149+
Required to compile `sharpy`:
150+
151+
- `MLIRROOT`: Set path to MLIR install root.
152+
- `IMEXROOT`: Set path to Intel MLIR Extensions install root.
153+
154+
### Optional runtime variables
155+
156+
- `SHARPY_VERBOSE`: Set verbosity level. Accepted values 0-4, default 0.
157+
- `SHARPY_FALLBACK`: Python package to call in case a function is not found in `sharpy`. For example, setting `SHARPY_FALLBACK=numpy` means that calling `sharpy.linalg.norm` would call `numpy.linalg.norm` for the entire (gathered) array.
158+
- `SHARPY_PASSES`: Set MLIR pass pipeline. To see current pipeline run with `SHARPY_VERBOSE=1`.
159+
- `SHARPY_FORCE_DIST`: Force code generation in distributed mode even if executed on a single process.
160+
- `SHARPY_USE_CACHE`: Use in-memory JIT compile cache. Default 1.
161+
- `SHARPY_OPT_LEVEL`: Set MLIR JIT compiler optimization level. Accepted values 0-3, default 3.
162+
- `SHARPY_NO_ASYNC`: Do not use asynchronous MPI communication.
163+
- `SHARPY_SKIP_COMM`: Skip all MPI communications. For debugging purposes only, can lead to incorrect results.
164+
165+
Device support:
166+
167+
- `SHARPY_DEVICE`: Set desided device, e.g., `"cpu"`, or `"gpu:0"`. By default CPU is used.
168+
- `SHARPY_GPUX_SO`: Force path to GPU driver library file.
169+
170+
For [spawning MPI processes](#distributed-execution-without-mpirun):
171+
172+
- `SHARPY_MPI_SPAWN`: Number of MPI processes to spawn.
173+
- `SHARPY_MPI_EXECUTABLE`: The executable to spawn.
174+
- `SHARPY_MPI_EXE_ARGS`: Arguments to pass to the executable.
175+
- `SHARPY_MPI_HOSTS`: Comma-separated list of hosts for MPI.
176+
- `PYTHON_EXE`: Path to Python executable. Will be used if `SHARPY_MPI_EXECUTABLE` is undefined.

0 commit comments

Comments
 (0)