Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVX-512でクラッシュする問題を修正 #287

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

KazApps
Copy link
Contributor

@KazApps KazApps commented Sep 13, 2024

AVX-512のコードがクラッシュする原因としては、

  • Accumulatorが64bytesでアライメントされていなかった。
  • kSimdWidthを2倍し忘れていた。

の2点だったようで、そこを修正することで正常に動作するようになりました。
ただ、R9-7945HXではnpsの向上は誤差でした。このサイトにもある通りZEN4でのAVX-512に実装ではしょうがないのかもしれませんが。Xeonではもう少しnpsが向上するかもしれません。

@KazApps
Copy link
Contributor Author

KazApps commented Sep 13, 2024

現在使われているNNUEのアーキテクチャには関係ないかもしれませんが、FeatureTransformer::Transformにおいて、AVX-512のコードのみ

for (IndexType i = 1; i < kRefreshTriggers.size(); ++i) {
    ...
}

がなくsumを正しく更新できてないような気がするので、修正しました(間違っていたらすみません)。

@yaneurao yaneurao merged commit 34214eb into yaneurao:master Oct 7, 2024
0 of 182 checks passed
@yaneurao
Copy link
Owner

yaneurao commented Oct 7, 2024

素晴らしいです!ありがとうございます!

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