Skip to content

Commit

Permalink
Allow disable some Simd.
Browse files Browse the repository at this point in the history
  • Loading branch information
jslap-ubi committed Nov 24, 2023
1 parent 1ff8948 commit fe600e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxruntime/core/mlas/lib/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ Return Value:
__cpuid_count(7, 0, Cpuid7[0], Cpuid7[1], Cpuid7[2], Cpuid7[3]);
#endif

#if !defined(ORT_DISABLE_AVX2)
if (((Cpuid1[2] & 0x1000) != 0) && ((Cpuid7[1] & 0x20) != 0)) {

this->GemmU8S8Dispatch = &MlasGemmU8S8DispatchAvx2;
Expand Down Expand Up @@ -375,6 +376,7 @@ Return Value:

#if !defined(ORT_MINIMAL_BUILD)

#if !defined(ORT_DISABLE_AVX512)
//
// Check if the processor supports AVX512F features and the
// operating system supports saving AVX512F state.
Expand Down Expand Up @@ -425,6 +427,7 @@ Return Value:
}
}
}
#endif // !defined(ORT_DISABLE_AVX512)

Check warning on line 430 in onnxruntime/core/mlas/lib/platform.cpp

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/mlas/lib/platform.cpp#L430

Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Raw output
onnxruntime/core/mlas/lib/platform.cpp:430:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]

Check warning on line 430 in onnxruntime/core/mlas/lib/platform.cpp

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/mlas/lib/platform.cpp#L430

At least two spaces is best between code and comments [whitespace/comments] [2]
Raw output
onnxruntime/core/mlas/lib/platform.cpp:430:  At least two spaces is best between code and comments  [whitespace/comments] [2]

#ifndef __APPLE__
//
Expand All @@ -444,6 +447,7 @@ Return Value:
#endif // ORT_MINIMAL_BUILD

}
#endif // !defined(ORT_DISABLE_AVX2)

Check warning on line 450 in onnxruntime/core/mlas/lib/platform.cpp

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/mlas/lib/platform.cpp#L450

Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Raw output
onnxruntime/core/mlas/lib/platform.cpp:450:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]

Check warning on line 450 in onnxruntime/core/mlas/lib/platform.cpp

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/mlas/lib/platform.cpp#L450

At least two spaces is best between code and comments [whitespace/comments] [2]
Raw output
onnxruntime/core/mlas/lib/platform.cpp:450:  At least two spaces is best between code and comments  [whitespace/comments] [2]

#endif // MLAS_TARGET_AMD64

Expand Down

0 comments on commit fe600e1

Please sign in to comment.