forked from bendavid/narf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
19 lines (15 loc) · 713 Bytes
/
setup.sh
File metadata and controls
19 lines (15 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export NARF_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export PYTHONPATH="${NARF_BASE}:$PYTHONPATH"
export EXTRA_CLING_ARGS="-O3"
export XRD_PARALLELEVTLOOP="16"
# prevent Eigen from spawning spurious threads
export OMP_NUM_THREADS="1"
#workaround for lock contention issue in tflite
export TF_ENABLE_ONEDNN_OPTS="0"
export TF_DISABLE_MKL="1"
# openblas doesn't scale well beyond 64 threads currently (v0.3.29)
# so set the number of threads to min(64, ncpus)
# note that --all is needed because otherwise nproc keys on
# OMP_NUM_THREADS set above and would return 1
export OPENBLAS_NUM_THREADS=$((`nproc --all`>64 ? 64 : `nproc --all`))
echo "Created environment variable NARF_BASE=${NARF_BASE}"