forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlas] add loongarch lsx and lasx optimize code (microsoft#17937)
### Description Hello we(@lixing-star) are the developers of loongson team. We add 128 (lsx), 256 (lasx) vector optimization code for the loongarch architecture [100% tests passed, 0 tests failed out of 7](https://cloud.a-boat.cn:2021/api/public/dl/6831z1Bi?inline=true) ### Development Environments1 ``` CPU: Loongson-3C5000L uname -a: Linux localhost.localdomain 4.19.190-6.4.lns8.loongarch64 #1 SMP Thu Jul 14 12:08:04 CST 2022 loongarch64 loongarch64 loongarch64 GNU/Linux ``` ### LonngArch Documents - [LoongArch Reference Manual - Volume 1: Basic Architecture: This manual describes the basic part of the LoongArch architecture.](https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html) - [LoongArch ELF psABI: This manual describes the LoongArch ELF psABI.](https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html) - [more](https://loongson.github.io/LoongArch-Documentation/README-EN.html)
- Loading branch information
1 parent
a045be3
commit 4abec97
Showing
41 changed files
with
7,696 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*++ | ||
Copyright (C) 2023 Loongson Technology Corporation Limited. All rights reserved. | ||
Licensed under the MIT License. | ||
Module Name: | ||
DgemmKernelCommon.h | ||
Abstract: | ||
This module contains common kernel macros and structures for the double | ||
precision matrix/matrix multiply operation (DGEMM). | ||
--*/ | ||
|
||
#define LFgemmElementShift 3 | ||
#define LFgemmElementSize (1 << LFgemmElementShift) | ||
#define LFgemmYmmElementCount (32/LFgemmElementSize) | ||
|
||
#include "FgemmKernelCommon.h" | ||
|
||
FGEMM_TYPED_INSTRUCTION(xvfadd, xvfadd.d) | ||
FGEMM_TYPED_INSTRUCTION(xvfmadd, xvfmadd.d) | ||
FGEMM_TYPED_INSTRUCTION(xvldrepl, xvldrepl.d) | ||
FGEMM_TYPED_INSTRUCTION(xvfmul, xvfmul.d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*++ | ||
Copyright (C) 2023 Loongson Technology Corporation Limited. All rights reserved. | ||
Licensed under the MIT License. | ||
Module Name: | ||
DgemmKernelLasx.s | ||
Abstract: | ||
This module implements the kernels for the double precision matrix/matrix | ||
multiply operation (DGEMM). | ||
This implementation uses Lasx instructions. | ||
--*/ | ||
|
||
#include "asmmacro.h" | ||
#include "DgemmKernelCommon.h" | ||
#include "FgemmKernelLasxCommon.h" | ||
|
||
.text | ||
|
||
// | ||
// Generate the GEMM kernel. | ||
// | ||
|
||
FgemmKernelLasxFunction MlasGemmDoubleKernelLasx | ||
|
||
.end |
Oops, something went wrong.