Skip to content

Instantly share code, notes, and snippets.

@zhuhaozhe
Last active April 23, 2024 03:14
Show Gist options
  • Save zhuhaozhe/688763e17e93e4c5e12f25f676ec90d9 to your computer and use it in GitHub Desktop.
Save zhuhaozhe/688763e17e93e4c5e12f25f676ec90d9 to your computer and use it in GitHub Desktop.
laucher for sgd bench
export LD_PRELOAD=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}/lib/libiomp5.so:${CONDA_PREFIX:-"$(dirname $(which conda))/../"}/lib/libjemalloc.so
export MALLOC_CONF="oversize_threshold:1,background_thread:true,metadata_thp:auto,dirty_decay_ms:-1,muzzy_decay_ms:-1"
export KMP_AFFINITY=granularity=fine,compact,1,0
export KMP_BLOCKTIME=1
export TENSOR_SIZE=262144
export NPARAM=4
export OMP_NUM_THREADS=1
echo "Tensor Size: $TENSOR_SIZE, Num Tensor $NPARAM, Num Threads: $OMP_NUM_THREADS"
numactl -C 1 -m 0 python sgd.py
export TENSOR_SIZE=4194304
export NPARAM=32
export OMP_NUM_THREADS=32
echo "Tensor Size: $TENSOR_SIZE, Num Tensor $NPARAM, Num Threads: $OMP_NUM_THREADS"
numactl -C 0-31 -m 0 python sgd.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment