[AVX512]: separated knl from avx2
This commit is contained in:
15
ispc.cpp
15
ispc.cpp
@@ -347,7 +347,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) && !defined(LLVM_3_5) && !defined(LLVM_3_6)// LLVM 3.7+
|
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) && !defined(LLVM_3_5) && !defined(LLVM_3_6)// LLVM 3.7+
|
||||||
compat[CPU_KNL] = Set(CPU_Generic, CPU_Bonnell, CPU_Penryn,
|
compat[CPU_KNL] = Set(CPU_Generic, CPU_Bonnell, CPU_Penryn,
|
||||||
CPU_Core2, CPU_Nehalem, CPU_Silvermont,
|
CPU_Core2, CPU_Nehalem, CPU_Silvermont,
|
||||||
CPU_SandyBridge, CPU_IvyBridge,
|
CPU_SandyBridge, CPU_IvyBridge,
|
||||||
CPU_Haswell, CPU_Broadwell, CPU_None);
|
CPU_Haswell, CPU_Broadwell, CPU_None);
|
||||||
@@ -841,11 +841,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo
|
|||||||
CPUfromISA = CPU_IvyBridge;
|
CPUfromISA = CPU_IvyBridge;
|
||||||
}
|
}
|
||||||
else if (!strcasecmp(isa, "avx2") ||
|
else if (!strcasecmp(isa, "avx2") ||
|
||||||
!strcasecmp(isa, "avx2-i32x8") ||
|
!strcasecmp(isa, "avx2-i32x8")) {
|
||||||
// TODO: enable knl and skx support
|
|
||||||
// They are downconverted to avx2 for code generation.
|
|
||||||
!strcasecmp(isa, "skx") ||
|
|
||||||
!strcasecmp(isa, "knl-avx512")) {
|
|
||||||
this->m_isa = Target::AVX2;
|
this->m_isa = Target::AVX2;
|
||||||
this->m_nativeVectorWidth = 8;
|
this->m_nativeVectorWidth = 8;
|
||||||
this->m_nativeVectorAlignment = 32;
|
this->m_nativeVectorAlignment = 32;
|
||||||
@@ -943,8 +939,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef ISPC_NVPTX_ENABLED
|
#ifdef ISPC_NVPTX_ENABLED
|
||||||
else if (!strcasecmp(isa, "nvptx"))
|
else if (!strcasecmp(isa, "nvptx")) {
|
||||||
{
|
|
||||||
this->m_isa = Target::NVPTX;
|
this->m_isa = Target::NVPTX;
|
||||||
this->m_cpu = "sm_35";
|
this->m_cpu = "sm_35";
|
||||||
this->m_nativeVectorWidth = 32;
|
this->m_nativeVectorWidth = 32;
|
||||||
@@ -1245,10 +1240,8 @@ Target::ISAToTargetString(ISA isa) {
|
|||||||
return "avx1.1-i32x8";
|
return "avx1.1-i32x8";
|
||||||
case Target::AVX2:
|
case Target::AVX2:
|
||||||
return "avx2-i32x8";
|
return "avx2-i32x8";
|
||||||
// TODO: enable knl and skx support.
|
|
||||||
// They are downconverted to avx2 for code generation.
|
|
||||||
case Target::KNL_AVX512:
|
case Target::KNL_AVX512:
|
||||||
return "avx2";
|
return "knl-avx512";
|
||||||
case Target::SKX:
|
case Target::SKX:
|
||||||
return "avx2";
|
return "avx2";
|
||||||
case Target::GENERIC:
|
case Target::GENERIC:
|
||||||
|
|||||||
@@ -2896,7 +2896,7 @@ lCreateDispatchFunction(llvm::Module *module, llvm::Function *setISAFunc,
|
|||||||
if ((Target::ISA)(i == Target::GENERIC) &&
|
if ((Target::ISA)(i == Target::GENERIC) &&
|
||||||
!g->target->getTreatGenericAsSmth().empty()) {
|
!g->target->getTreatGenericAsSmth().empty()) {
|
||||||
if (g->target->getTreatGenericAsSmth() == "knl_generic")
|
if (g->target->getTreatGenericAsSmth() == "knl_generic")
|
||||||
dispatchNum = Target::KNL;
|
dispatchNum = Target::KNL_AVX512;
|
||||||
else if (g->target->getTreatGenericAsSmth() == "skx_generic")
|
else if (g->target->getTreatGenericAsSmth() == "skx_generic")
|
||||||
dispatchNum = Target::SKX;
|
dispatchNum = Target::SKX;
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user