Skip to content

[2026秋季][Task07] jinger861-git#155

Open
jinger861-git wants to merge 1 commit into
DeepLink-org:mainfrom
jinger861-git:QY2026_Autumn_jinger861-git_Task07LayerNorm_MLU
Open

[2026秋季][Task07] jinger861-git#155
jinger861-git wants to merge 1 commit into
DeepLink-org:mainfrom
jinger861-git:QY2026_Autumn_jinger861-git_Task07LayerNorm_MLU

Conversation

@jinger861-git

Copy link
Copy Markdown
Contributor

Summary

  • Optimize Task07 LayerNorm for Cambricon MLU.
  • Implement LayerNorm as one Triton kernel with fp32 mean/variance reductions.
  • Use an exact non-power-of-two rows x 10 vector tile for the competition shape.
  • Use MLU Libdevice rsqrt for reciprocal standard deviation.
  • Fall back to native F.layer_norm for non-contiguous inputs or larger leading dimensions.

Accuracy

PASS with the official KS benchmark.

  • atol: 1e-2
  • rtol: 1e-2
  • Additional shapes (1, 10), (10, 10), (2, 8, 10), and (32, 10) passed with max absolute difference <= 2.39e-7.

Performance

Official benchmark median over three complete runs:

  • v0: 0.135740 ms
  • v1: 0.013866 ms
  • speedup: 9.789x

Changed file

  • dlblas/kernels/ks_competition/QY2026_Autumn_jinger861-git_Task07LayerNorm_MLU.py****

@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jinger861-git
jinger861-git force-pushed the QY2026_Autumn_jinger861-git_Task07LayerNorm_MLU branch from de433ee to 1e25c6c Compare July 10, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants