other gemm kernel use half-vector-machine style
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef SNative
|
||||
#define SNative
|
||||
|
||||
#ifdef __cplusplus
|
||||
#error "This header is not meant to be included in C++ code. StgSharp.Native is a C library and should be used with C linkage."
|
||||
#endif
|
||||
|
||||
#include "sn_internal.h"
|
||||
#include "sn_target.h"
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#ifndef SN_
|
||||
#endif
|
||||
|
||||
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
|
||||
#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec)
|
||||
#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec)
|
||||
|
||||
typedef struct Image {
|
||||
int width;
|
||||
int height;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define SSC_INTRIN_HEAD
|
||||
|
||||
#include "StgSharpNative.h"
|
||||
#include "sn_target.h"
|
||||
#include <xmmintrin.h>
|
||||
#include <immintrin.h>
|
||||
#include <smmintrin.h>
|
||||
@@ -26,9 +27,31 @@
|
||||
#define M256_PERMUTE(s3, s2, s1, s0) \
|
||||
((LASTTWO(s3) << 6) | (LASTTWO(s2) << 4) | (LASTTWO(s1) << 2) | (LASTTWO(s0)))
|
||||
#define BIT_CVRT(pack, index, T) *(T *)(pack->data + index)
|
||||
|
||||
#if SN_IS_ARCH(x86_64)
|
||||
|
||||
#define vec_128 __m128
|
||||
#define vec_256 __m256
|
||||
#define vec_512 __m512
|
||||
|
||||
#define zero_vec _mm_setzero_ps()
|
||||
#define zero_vec_256 _mm256_setzero_ps()
|
||||
|
||||
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
|
||||
#define ALIGN256(simdVec) _mm256_loadu_ps(&simdVec)
|
||||
#define ALIGN512(simdVec) _mm512_loadu_ps(&simdVec)
|
||||
|
||||
#else
|
||||
|
||||
#define zero_vec
|
||||
#define zero_vec_256
|
||||
|
||||
#define ALIGN(simdVec)
|
||||
#define ALIGN256(simdVec)
|
||||
#define ALIGN512(simdVec)
|
||||
|
||||
#endif
|
||||
|
||||
#define SPAN(T) \
|
||||
struct SPAN_T { \
|
||||
T *pointer; \
|
||||
@@ -126,6 +149,4 @@ typedef struct sn_intrinsic {
|
||||
|
||||
typedef enum elment_mask { F32 = 0, F64 = 1, I32 = 2, I64 = 3 } element_mask;
|
||||
|
||||
#include "sn_target.h"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user