Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems in building #5536

Open
francoamato opened this issue Jul 18, 2024 · 0 comments
Open

Problems in building #5536

francoamato opened this issue Jul 18, 2024 · 0 comments
Assignees
Labels
legacy:selfie segmentation Issues related to selfie segmentation platform:c++ Issues specific to C++ framework in mediapipe type:build/install For Build and Installation issues

Comments

@francoamato
Copy link

OS Platform and Distribution

Linux RHEL 9

Compiler version

g++ 13.2.1

Programming Language and version

C++ 17

Installed using virtualenv? pip? Conda?(if python)

no

MediaPipe version

No response

Bazel version

No response

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

No

OpenCV version (if running on desktop)

4.10

Describe the problem

I can not build mediapipe

Complete Logs

I have this cpu model:
Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
Giving lscpu I get these flags:
    Flags: 
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 smep bmi2 invpcid rdseed adx smap clflushopt clwb arat md_clear flush_l1d arch_capabilities

I need to build MediaPipe with the most general configuration possible to prevent my program from crashing when I link it to the MediaPipe library.
The other libraries of my software are built with the following flags:
-march=x86-64 -mtune=generic -Wno-padded
I cannot reproduce the same in building MediaPipe.
I tried a most hardware-independent configuration in this way:
$ bazel build --explain=log.txt --define MEDIAPIPE_DISABLE_GPU=1 --define=mediapipe_xnnpack_disabled=true --define=tflite_with_xnnpack=false --copt=-march=x86-64 --copt=-mtune=generic --copt=-Wno-padded --copt=-mno-avx512f --copt=-mno-avx512bw --copt=-mno-avx512cd --copt=-mno-avx512dq --copt=-mno-avx512vl --copt=-mno-avx512vbmi --copt=-mno-avx512ifma --copt=-mno-avx5124fmaps --copt=-mno-avx5124vnniw --copt=-mno-avxvnni --copt=-mno-avx2 --copt=-mno-avx512bf16 --copt=-mno-avx512er --verbose_failures //mediapipe/modules/selfie_segmentation:selfie_segmentation_cpu

But it gives to me a lot of errors related to xnnpack even if it's supposed that I deactivated it with the flag define=mediapipe_xnnpack_disabled=true --define=tflite_with_xnnpack=false
Below an example of error:
external/org_tensorflow/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc: In constructor 'tflite::xnnpack::{anonymous}::Delegate::Delegate(const TfLiteXNNPackDelegateOptions*, xnn_workspace_t, TfLiteContext*)':
external/org_tensorflow/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc:508:55: error: 'class tflite::CpuBackendContext' has no member named 'get_xnnpack_threadpool'
  508 |           CpuBackendContext::GetFromContext(context)->get_xnnpack_threadpool();
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~

I would like to have a help in building
@francoamato francoamato added the type:build/install For Build and Installation issues label Jul 18, 2024
@kuaashish kuaashish added platform:c++ Issues specific to C++ framework in mediapipe legacy:selfie segmentation Issues related to selfie segmentation labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:selfie segmentation Issues related to selfie segmentation platform:c++ Issues specific to C++ framework in mediapipe type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

2 participants