[PR #115] [MERGED] Fixed the bug in get_swizzle_mode function related to elem_size setting. #250

Closed
opened 2026-10-26 21:15:20 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/115
Author: @Ther-LF
Created: 6/17/2025
Status: ✅ Merged
Merged: 6/23/2025
Merged by: @LyricZhao

Base: main ← Head: fix_get_swizzle_mode


📝 Commits (1)

  • 88a2b6c Fixed the bug in get_swizzle_mode function related to elem_size setting.

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 deep_gemm/jit_kernels/gemm.py (+3 -3)

📄 Description

Commit Message:​​
The get_swizzle_mode function sets the swizzle mode for output tensors but hardcodes the element size to 2 (fp16). However, in wgrad_gemm_fp8_fp8_fp32_nt, the output tensor is fp32 (element size 4), causing incorrect swizzle mode selection.

​​Fix:​​
Added an is_fp32_out parameter to dynamically determine the element size (2 for fp16, 4 for fp32).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/115 **Author:** [@Ther-LF](https://github.com/Ther-LF) **Created:** 6/17/2025 **Status:** ✅ Merged **Merged:** 6/23/2025 **Merged by:** [@LyricZhao](https://github.com/LyricZhao) **Base:** `main` ← **Head:** `fix_get_swizzle_mode` --- ### 📝 Commits (1) - [`88a2b6c`](https://github.com/deepseek-ai/DeepGEMM/commit/88a2b6c4901cfbe418481ddb9b1a225e5df6f53a) Fixed the bug in get_swizzle_mode function related to elem_size setting. ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `deep_gemm/jit_kernels/gemm.py` (+3 -3) </details> ### 📄 Description Commit Message:​​ The `get_swizzle_mode` function sets the swizzle mode for output tensors but hardcodes the element size to 2 (fp16). However, in `wgrad_gemm_fp8_fp8_fp32_nt`, the output tensor is fp32 (element size 4), causing incorrect swizzle mode selection. ​​Fix:​​ Added an is_fp32_out parameter to dynamically determine the element size (2 for fp16, 4 for fp32). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:15:20 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#250
No description provided.