add isa check
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#ifndef SSC_INTRIN
|
||||
#ifndef SSC_INTRIN
|
||||
#define SSC_INTRIN
|
||||
|
||||
#define SSC_INTRIN_HEAD
|
||||
@@ -328,4 +328,38 @@ typedef enum most_advanced_instruction {
|
||||
#endif
|
||||
} most_advanced_instruction;
|
||||
|
||||
#include "sn_target.h"
|
||||
|
||||
#if SN_IS_ARCH(SN_ARCH_X86_64)
|
||||
|
||||
typedef enum intrinsic_level {
|
||||
// No SIMD support, will cause error if used in matrix operations
|
||||
SIMD0 = 0,
|
||||
// SSE4.2 support
|
||||
SIMD1 = 1,
|
||||
// AVX2 support
|
||||
SIMD2 = 2,
|
||||
// AVX2 and AVX2-FMA support
|
||||
SIMD3 = 3,
|
||||
// AVX2-16C support based on SIMD3
|
||||
SIMD4 = 4,
|
||||
// AVX-512-dual support
|
||||
SIMD5 = 5,
|
||||
// AVX-512-native support
|
||||
SIMD6 = 6,
|
||||
// AVX-512 with 8/16-wide support
|
||||
SIMD7 = 7,
|
||||
// AMX support
|
||||
SIMD8 = 8,
|
||||
// AVX-10 support
|
||||
SIMD9 = 9,
|
||||
// future use
|
||||
SIMD_MAX = 10
|
||||
} intrinsic_level;
|
||||
|
||||
#else
|
||||
typedef enum intrinsic_level {
|
||||
} intrinsic_level;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user