File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -51,19 +51,26 @@ static void WarnIfFeatureUnused(
51
51
const bool cpu_has_feature, const string& feature) {
52
52
VLOG (1 ) << " Caffe2 not built with " << feature << " ." ;
53
53
if (cpu_has_feature) {
54
+ #ifdef CAFFE2_NO_CROSS_ARCH_WARNING
55
+ // When cross-compiling single binary for multiple archs - turns off the
56
+ // annoying warning
57
+ VLOG (1 )
58
+ #else
54
59
LOG (ERROR)
55
- << " CPU feature " << feature << " is present on your machine, "
56
- " but the Caffe2 binary is not compiled with it. It means you "
57
- " may not get the full speed of your CPU." ;
60
+ #endif
61
+ << " CPU feature " << feature
62
+ << " is present on your machine, "
63
+ " but the Caffe2 binary is not compiled with it. It means you "
64
+ " may not get the full speed of your CPU." ;
58
65
}
59
66
}
60
67
61
68
bool Caffe2CheckIntrinsicsFeatures (int *, char ***) {
62
69
63
70
#ifdef __AVX__
64
- QuitIfFeatureUnsupported (GetCpuId ().avx2 (), " avx" );
71
+ QuitIfFeatureUnsupported (GetCpuId ().avx (), " avx" );
65
72
#else
66
- WarnIfFeatureUnused (GetCpuId ().avx2 (), " avx" );
73
+ WarnIfFeatureUnused (GetCpuId ().avx (), " avx" );
67
74
#endif
68
75
69
76
#ifdef __AVX2__
You can’t perform that action at this time.
0 commit comments