Skip to content

Commit 91a2a56

Browse files
authored
musa: update compile flags (#16265)
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent 72ee736 commit 91a2a56

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

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)