File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -867,7 +867,7 @@ MlasGemmQuantGetDispatch(
867
867
{
868
868
const MLAS_GEMM_QUANT_DISPATCH* GemmQuantDispatch = &MlasGemmQuantDispatchDefault;
869
869
870
- #if defined(MLAS_TARGET_AMD64_IX86) || defined(MLAS_TARGET_LARCH64)
870
+ #if defined(MLAS_TARGET_AMD64_IX86)
871
871
if (AIsSigned) {
872
872
GemmQuantDispatch =
873
873
BIsSigned ? GetMlasPlatform ().GemmS8S8Dispatch : GetMlasPlatform ().GemmS8U8Dispatch ;
@@ -895,6 +895,11 @@ MlasGemmQuantGetDispatch(
895
895
if (GetMlasPlatform ().GemmU8X8Dispatch == &MlasGemm8X8DispatchPOWER10) {
896
896
GemmQuantDispatch = GetMlasPlatform ().GemmU8X8Dispatch ;
897
897
}
898
+ #elif defined(MLAS_TARGET_LARCH64)
899
+ if (!AIsSigned) {
900
+ GemmQuantDispatch =
901
+ BIsSigned ? GetMlasPlatform ().GemmU8S8Dispatch : GetMlasPlatform ().GemmU8U8Dispatch ;
902
+ }
898
903
#endif
899
904
900
905
if (nullptr == GemmQuantDispatch) {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ TEST(AllocatorTest, CPUAllocatorTest) {
16
16
EXPECT_EQ (cpu_arena->Info ().id , 0 );
17
17
18
18
// arena is disabled for CPUExecutionProvider on x86 and JEMalloc
19
- #if (defined(__amd64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(_M_ARM64)) && !defined(USE_JEMALLOC) && !defined(USE_MIMALLOC) && !defined(ABSL_HAVE_ADDRESS_SANITIZER)
19
+ #if (defined(__amd64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(__loongarch__) || defined( _M_ARM64)) && !defined(USE_JEMALLOC) && !defined(USE_MIMALLOC) && !defined(ABSL_HAVE_ADDRESS_SANITIZER)
20
20
EXPECT_EQ (cpu_arena->Info ().alloc_type , OrtAllocatorType::OrtArenaAllocator);
21
21
#else
22
22
EXPECT_EQ (cpu_arena->Info ().alloc_type , OrtAllocatorType::OrtDeviceAllocator);
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ TEST(TensorTest, EmptyTensorTest) {
138
138
EXPECT_EQ (location.id , 0 );
139
139
140
140
// arena is disabled for CPUExecutionProvider on x86 and JEMalloc
141
- #if (defined(__amd64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(_M_ARM64)) && !defined(USE_JEMALLOC) && !defined(USE_MIMALLOC) && !defined(ABSL_HAVE_ADDRESS_SANITIZER)
141
+ #if (defined(__amd64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(__loongarch__) || defined( _M_ARM64)) && !defined(USE_JEMALLOC) && !defined(USE_MIMALLOC) && !defined(ABSL_HAVE_ADDRESS_SANITIZER)
142
142
EXPECT_EQ (location.alloc_type , OrtAllocatorType::OrtArenaAllocator);
143
143
#else
144
144
EXPECT_EQ (location.alloc_type , OrtAllocatorType::OrtDeviceAllocator);
You can’t perform that action at this time.
0 commit comments