Browse Source

Refs #332. Added addtional Intel Ivy Bridge and Haswell CPU-id.

tags/v0.2.9.rc2^2
Zhang Xianyi 11 years ago
parent
commit
ab69443bd4
2 changed files with 10 additions and 3 deletions
  1. +7
    -0
      cpuid_x86.c
  2. +3
    -3
      driver/others/dynamic.c

+ 7
- 0
cpuid_x86.c View File

@@ -1051,11 +1051,14 @@ int get_cpuname(void){
case 3:
switch (model) {
case 10:
case 14:
// Ivy Bridge
if(support_avx())
return CPUTYPE_SANDYBRIDGE;
else
return CPUTYPE_NEHALEM;
case 12:
case 15:
if(support_avx())
return CPUTYPE_HASWELL;
else
@@ -1065,6 +1068,7 @@ int get_cpuname(void){
case 4:
switch (model) {
case 5:
case 6:
if(support_avx())
return CPUTYPE_HASWELL;
else
@@ -1457,11 +1461,13 @@ int get_coretype(void){
case 3:
switch (model) {
case 10:
case 14:
if(support_avx())
return CORE_SANDYBRIDGE;
else
return CORE_NEHALEM; //OS doesn't support AVX
case 12:
case 15:
if(support_avx())
return CORE_HASWELL;
else
@@ -1471,6 +1477,7 @@ int get_coretype(void){
case 4:
switch (model) {
case 5:
case 6:
if(support_avx())
return CORE_HASWELL;
else


+ 3
- 3
driver/others/dynamic.c View File

@@ -186,7 +186,7 @@ static gotoblas_t *get_coretype(void){
return NULL;
case 3:
//Intel Sandy Bridge 22nm (Ivy Bridge?)
if (model == 10) {
if (model == 10 || model == 14) {
if(support_avx())
return &gotoblas_SANDYBRIDGE;
else{
@@ -195,7 +195,7 @@ static gotoblas_t *get_coretype(void){
}
}
//Intel Haswell
if (model == 12) {
if (model == 12 || model == 15) {
if(support_avx())
return &gotoblas_HASWELL;
else{
@@ -206,7 +206,7 @@ static gotoblas_t *get_coretype(void){
return NULL;
case 4:
//Intel Haswell
if (model == 5) {
if (model == 5 || model == 6) {
if(support_avx())
return &gotoblas_HASWELL;
else{


Loading…
Cancel
Save