cmake -S . -B build -DGGML_HIP=1 -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_C_COMPILER=/opt/dtk/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/dtk/llvm/bin/clang++ -DAMDGPU_TARGETS=gfx928 -DGPU_TARGETS=gfx928 
echo "build step2..."

for f in `ag xhip build -l`
do

   sed -i 's/^\(C_FLAGS.*\) -xhip --cuda-gpu-arch=gfx928\(.*\)/\1 --gpu-max-threads-per-block=1024 \2/g' $f
   sed -i 's/^\(CXX_FLAGS.*\)/\1 --gpu-max-threads-per-block=1024/g' $f
done
cmake --build build --config Release -- -j 16
echo "build done..."
