Skip to content

Commit

Permalink
allow reordering server.sh args
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Feb 9, 2024
1 parent 84a099e commit 3e5fce3
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions rllm/rllm-cuda/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,38 @@ else
(cd $WS && git submodule update --init --recursive)
fi

if [ "$1" = "--trace" ] ; then
R_LOG=info,tokenizers=error,rllm=trace,aicirt=info,llama_cpp_low=trace
while [ "$1" != "" ] ; do
case "$1" in
--release )
REL=--release
;;
--debug )
REL=
;;
--loop )
LOOP=1
;;
--cuda )
if [ "$CPP" = 1 ] ; then
VER="$VER --features cuda"
ADD_ARGS="--gpu-layers 1000"
else
echo "--cuda only valid for llama.cpp"
exit 1
fi
;;
--trace )
R_LOG=info,tokenizers=error,rllm=trace,aicirt=info,llama_cpp_low=trace
;;
--trace-rt )
R_LOG=info,tokenizers=error,rllm=trace,aicirt=trace,llama_cpp_low=trace
;;
* )
break
;;
esac
shift
fi

if [ "$1" = "--trace-rt" ] ; then
R_LOG=info,tokenizers=error,rllm=trace,aicirt=trace,llama_cpp_low=trace
shift
fi

if [ "$1" = "--loop" ] ; then
LOOP=1
shift
fi

if [ "$1" = "--cuda" ] ; then
if [ "$CPP" = 1 ] ; then
VER="$VER --features cuda"
ADD_ARGS="--gpu-layers 1000"
else
echo "--cuda only valid for llama.cpp"
exit 1
fi
shift
fi

if [ "$1" = "--debug" ] ; then
REL=
shift
fi
done

EXPECTED=$WS/rllm/rllm-cuda/expected

Expand Down

0 comments on commit 3e5fce3

Please sign in to comment.