COMPMID-881: Fixed x86 builds and removed printfs
Change-Id: I52db3e57a7984847ed42e3284b4c040beb4d7b18
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124849
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/core/NEON/kernels/assembly/newgemm_lib.hpp b/arm_compute/core/NEON/kernels/assembly/newgemm_lib.hpp
index b7cc3d7..0e232b6 100644
--- a/arm_compute/core/NEON/kernels/assembly/newgemm_lib.hpp
+++ b/arm_compute/core/NEON/kernels/assembly/newgemm_lib.hpp
@@ -58,7 +58,7 @@
#endif
-#ifndef BARE_METAL
+#if ! defined(BARE_METAL) && (defined(__arm__) || defined(__aarch64__))
#include <sys/auxv.h>
/* Get HWCAP bits from asm/hwcap.h */
@@ -203,8 +203,6 @@
_percpu[curcpu].midr = midr;
_percpu[curcpu].model = midr_to_model(midr);
_percpu[curcpu].model_set = true;
-
- printf("CPU %d: %x\n",curcpu,midr);
}
midr=0;
@@ -244,7 +242,6 @@
_percpu[curcpu].model = midr_to_model(midr);
_percpu[curcpu].model_set = true;
- printf("CPU %d: %x\n",curcpu,midr);
}
}
}
@@ -254,7 +251,7 @@
int get_max_cpus() {
int max_cpus = 1;
-#ifndef BARE_METAL
+#if ! defined(BARE_METAL) && (defined(__arm__) || defined(__aarch64__))
std::ifstream CPUspresent;
CPUspresent.open("/sys/devices/system/cpu/present", std::ios::in);
bool success = false;
@@ -294,7 +291,7 @@
public:
CPUInfo() {
-#ifndef BARE_METAL
+#if ! defined(BARE_METAL) && (defined(__arm__) || defined(__aarch64__))
unsigned long hwcaps = getauxval(AT_HWCAP);
if (hwcaps & HWCAP_CPUID) {
@@ -383,7 +380,7 @@
}
CPUModel get_cpu_model() const {
-#ifdef BARE_METAL
+#if defined(BARE_METAL) || (!defined(__arm__) && !defined( __aarch64__) )
return get_cpu_model(0);
#else
return get_cpu_model(sched_getcpu());