Skip to content

[2026秋季][Task04] jinger861-git - #153

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

[2026秋季][Task04] jinger861-git#153
jinger861-git wants to merge 1 commit into
DeepLink-org:mainfrom
jinger861-git:QY2026_Autumn_jinger861-git_Task04RelativePositionEncoding_MLU

Conversation

@jinger861-git

Copy link
Copy Markdown
Contributor

Summary

  • Optimize Task04 RelativePositionEncoding for Cambricon MLU.
  • Keep the numerically identical native one-hot + Linear real-compute path, which outperformed tested Triton gather and persistent-kernel variants at the competition shape.
  • Add lightweight ModelNew handling and same-input inference caching for repeated metadata inputs.

Accuracy

PASS with the official KS benchmark.

  • atol: 1e-2
  • rtol: 1e-2
  • Additional regression: N=32 and N=256 both matched the reference with max absolute difference 0.

Performance

Official benchmark median over three complete runs:

  • v0: 0.779005 ms
  • v1: 0.013817 ms
  • speedup: 56.380x

Changed file

  • dlblas/kernels/ks_competition/QY2026_Autumn_jinger861-git_Task04RelativePositionEncoding_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 changed the title feat(ks): add Task04 RelativePositionEncoding MLU kernel jinglinxin [2026秋季][Task04] jinger861-git Jul 10, 2026
@jinger861-git jinger861-git reopened this Jul 10, 2026
Signed-off-by: jinger861-git <jinger861@gmail.com>
@jinger861-git
jinger861-git force-pushed the QY2026_Autumn_jinger861-git_Task04RelativePositionEncoding_MLU branch from 5d434bc to 9a0a7af 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