Skip to content

Commit 126e08a

Browse files
authored
Merge branch 'ggml-org:master' into mamba-checkpoints-3
2 parents bb92d83 + 91a2a56 commit 126e08a

File tree

5 files changed

+40
-20
lines changed

5 files changed

+40
-20
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ jobs:
362362
id: checkout
363363
uses: actions/checkout@v4
364364

365-
- name: ccache
366-
uses: ggml-org/[email protected]
367-
with:
368-
key: ubuntu-latest-cmake-rpc
369-
evict-old-files: 1d
365+
# - name: ccache
366+
# uses: ggml-org/[email protected]
367+
# with:
368+
# key: ubuntu-latest-cmake-rpc
369+
# evict-old-files: 1d
370370

371371
- name: Dependencies
372372
id: depends
@@ -387,8 +387,8 @@ jobs:
387387
cd build
388388
ctest -L main --verbose
389389
390-
ubuntu-22-cmake-vulkan:
391-
runs-on: ubuntu-22.04
390+
ubuntu-24-cmake-vulkan:
391+
runs-on: ubuntu-24.04
392392

393393
steps:
394394
- name: Clone
@@ -398,20 +398,40 @@ jobs:
398398
- name: ccache
399399
uses: ggml-org/[email protected]
400400
with:
401-
key: ubuntu-22-cmake-vulkan
401+
key: ubuntu-24-cmake-vulkan
402402
evict-old-files: 1d
403403

404404
- name: Dependencies
405405
id: depends
406406
run: |
407-
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
408-
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
407+
sudo add-apt-repository -y ppa:kisak/kisak-mesa
409408
sudo apt-get update -y
410-
sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libcurl4-openssl-dev
409+
sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libcurl4-openssl-dev
410+
411+
- name: Get latest Vulkan SDK version
412+
id: vulkan_sdk_version
413+
run: |
414+
echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
415+
416+
- name: Cache Vulkan SDK
417+
id: cache_vulkan_sdk
418+
uses: actions/cache@v4
419+
with:
420+
path: ./vulkan_sdk
421+
key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
422+
423+
- name: Install Vulkan SDK
424+
if: steps.cache_vulkan_sdk.outputs.cache-hit != 'true'
425+
id: vulkan_sdk_install
426+
run: |
427+
mkdir -p vulkan_sdk
428+
cd vulkan_sdk
429+
curl --no-progress-meter https://sdk.lunarg.com/sdk/download/latest/linux/vulkan_sdk.tar.xz | tar -Jx --strip-components=1
411430
412431
- name: Build
413432
id: cmake_build
414433
run: |
434+
source ./vulkan_sdk/setup-env.sh
415435
cmake -B build \
416436
-DGGML_VULKAN=ON
417437
cmake --build build --config Release -j $(nproc)
@@ -421,6 +441,7 @@ jobs:
421441
run: |
422442
cd build
423443
export GGML_VK_VISIBLE_DEVICES=0
444+
export GGML_VK_DISABLE_F16=1
424445
# This is using llvmpipe and runs slower than other backends
425446
ctest -L main --verbose --timeout 4200
426447

ci/run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ mkdir -p "$2"
3434
OUT=$(realpath "$1")
3535
MNT=$(realpath "$2")
3636

37-
rm -f "$OUT/*.log"
38-
rm -f "$OUT/*.exit"
39-
rm -f "$OUT/*.md"
37+
rm -f $OUT/*.log
38+
rm -f $OUT/*.exit
39+
rm -f $OUT/*.md
4040

4141
sd=`dirname $0`
4242
cd $sd/../
@@ -607,6 +607,7 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
607607
fi
608608

609609
ret=0
610+
610611
test $ret -eq 0 && gg_run ctest_debug
611612
test $ret -eq 0 && gg_run ctest_release
612613

@@ -624,4 +625,6 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
624625
test $ret -eq 0 && gg_run ctest_with_model_release
625626
fi
626627

628+
cat $OUT/README.md
629+
627630
exit $ret

ggml/src/ggml-cuda/fattn-vec.cuh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ void ggml_cuda_flash_attn_ext_vec_case(ggml_backend_cuda_context & ctx, ggml_ten
535535
float logit_softcap;
536536
memcpy(&logit_softcap, (const float *) KQV->op_params + 2, sizeof(float));
537537

538-
const int cc = ggml_cuda_info().devices[ggml_cuda_get_device()].cc;
539-
540538
if (Q->ne[1] == 1) {
541539
constexpr int cols_per_block = 1;
542540
if (logit_softcap == 0.0f) {

ggml/src/ggml-cuda/topk-moe.cu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
It is intended as fusion of softmax->top-k->get_rows pipeline for MoE models
1515
*/
16-
template <size_t n_experts, bool with_norm>
16+
template <int n_experts, bool with_norm>
1717
__launch_bounds__(4 * WARP_SIZE, 1) __global__ void topk_moe_cuda(const float * logits,
1818
float * weights,
1919
int32_t * ids,
@@ -204,8 +204,6 @@ void ggml_cuda_op_topk_moe(ggml_backend_cuda_context & ctx,
204204

205205
GGML_ASSERT(ids->nb[1] / ggml_type_size(ids->type) == (size_t) n_experts);
206206

207-
cudaStream_t stream = ctx.stream();
208-
209207
const int n_expert_used = weights->ne[1];
210208

211209
if (with_norm) {

ggml/src/ggml-musa/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (MUSAToolkit_FOUND)
5656

5757
set_source_files_properties(${GGML_SOURCES_MUSA} PROPERTIES LANGUAGE CXX)
5858
foreach(SOURCE ${GGML_SOURCES_MUSA})
59-
set(COMPILE_FLAGS "-fsigned-char -x musa -mtgpu")
59+
set(COMPILE_FLAGS "-Od3 -fno-strict-aliasing -ffast-math -fsigned-char -x musa -mtgpu -fmusa-flush-denormals-to-zero")
6060
foreach(ARCH ${MUSA_ARCHITECTURES})
6161
set(COMPILE_FLAGS "${COMPILE_FLAGS} --cuda-gpu-arch=mp_${ARCH}")
6262
endforeach()

0 commit comments

Comments
 (0)