'프로그램 사용/yolo_tensorflow_golo'에 해당되는 글 88건

  1. 2022.03.22 yolo-label
  2. 2022.01.27 tflite bazel rpi3b+
  3. 2022.01.27 bazel cross compile
  4. 2021.10.19 bazel clean
  5. 2021.10.13 2.7.0-rc with opencl
  6. 2021.10.12 tf release 2.7.0-rc
  7. 2021.10.11 tflite delegate
  8. 2021.08.31 tflite gpu openCL support build fail
  9. 2021.08.27 tf lite cmake
  10. 2021.07.01 tensorflow cross compile

윈도우용 라벨링 프로그램 찾다가 발견

[링크 : https://github.com/developer0hye/Yolo_Label]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

yolo-label  (0) 2022.03.22
tflite bazel rpi3b+  (0) 2022.01.27
bazel cross compile  (0) 2022.01.27
bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
Posted by 구차니

댓글을 달아 주세요

요약하면.. 메모리 부족하니 빌드 속도를 포기하고 swap을 이용해서 커버치기!

[링크 : https://gist.github.com/EKami/9869ae6347f68c592c5b5cd181a3b205]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

yolo-label  (0) 2022.03.22
tflite bazel rpi3b+  (0) 2022.01.27
bazel cross compile  (0) 2022.01.27
bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
Posted by 구차니

댓글을 달아 주세요

 

[링크 : https://docs.bazel.build/versions/main/platforms-intro.html]

[링크 : https://docs.bazel.build/versions/main/tutorial/cc-toolchain-config.html]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

yolo-label  (0) 2022.03.22
tflite bazel rpi3b+  (0) 2022.01.27
bazel cross compile  (0) 2022.01.27
bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
Posted by 구차니

댓글을 달아 주세요

리눅스 홈 디렉토리 용량 검사하다 보니 이상하게 많이 먹어 추적해보니

~/.cache/bazel 이 7기가 정도?

bazel clean 을 통해서 용량을 감소시킬수 있다고 하는데 문제는 워크스페이스 날렸으면 무리

그냥 쿨(?) 하게 ~/.cache/bazel 을 날리니 용량이 훅 줄어든다.

$ bazel clean
Extracting Bazel installation...
ERROR: The 'clean' command is only supported from within a workspace (below a directory having a WORKSPACE file).
See documentation at https://docs.bazel.build/versions/master/build-ref.html#workspace

[링크 : https://github.com/Tencent/PhoenixGo/issues/76]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

tflite bazel rpi3b+  (0) 2022.01.27
bazel cross compile  (0) 2022.01.27
bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
tflite delegate  (0) 2021.10.11
Posted by 구차니

댓글을 달아 주세요

빌드해보려다가 라즈베리 4에서 실패인지 성공인지 미묘하게 완료

 

$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow/
$ git checkout v2.7.0-rc0

$ mkdir ../tflite_build
$ cd ../tflite_build
$ cmake ../tensorflow/tensorflow/lite/ -DTFLITE_ENABLE_GPU=ON

[링크 : https://www.tensorflow.org/lite/guide/build_cmake]

 

문제는 rpi 3용 videocore IV는 openCL 사용자 버전이 있는데

rpi 4용 videocore VI는 아직 안나와서 쓸수가 없을 듯 ㅠㅠ

/home/pi/work/tflite_build/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")

[링크 : https://github.com/doe300/VC4CL/issues/86]

[링크 : https://github.com/Idein/py-videocore6]

[링크 : https://forums.raspberrypi.com/viewtopic.php?t=312646]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

bazel cross compile  (0) 2022.01.27
bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
tflite delegate  (0) 2021.10.11
tflite gpu openCL support build fail  (0) 2021.08.31
Posted by 구차니

댓글을 달아 주세요

정식 릴리즈는 아니고 후보인데 tensorflow lite 빌드를 make 사용하지 않고

cmake나 bazel로만 되도록 변경됨.

 

[링크 : https://github.com/tensorflow/tensorflow/releases]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

bazel clean  (0) 2021.10.19
2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
tflite delegate  (0) 2021.10.11
tflite gpu openCL support build fail  (0) 2021.08.31
tf lite cmake  (0) 2021.08.27
Posted by 구차니

댓글을 달아 주세요

과거에도 있긴 했지만.. 도대체 이 delegate는 어떤 통로를 통해 tensorflow lite에서 사용이 가능해지는 건진 모르겠다.

 

[링크 : https://www.tensorflow.org/lite/performance/implementing_delegate]

[링크 : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/gpu/README.md]

[링크 : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/label_image/label_image.cc]

 

 

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

2.7.0-rc with opencl  (0) 2021.10.13
tf release 2.7.0-rc  (0) 2021.10.12
tflite delegate  (0) 2021.10.11
tflite gpu openCL support build fail  (0) 2021.08.31
tf lite cmake  (0) 2021.08.27
tensorflow cross compile  (0) 2021.07.01
Posted by 구차니

댓글을 달아 주세요

 

 

[ 57%] Building C object _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qs8-gavgpool/gen/7p7x-minmax-neon-c8-acc2.c.o
/home/pi/work/tflite_build/xnnpack/src/qs8-gavgpool/gen/7x-minmax-neon-c16-acc2.c: In function ‘xnn_qs8_gavgpool_minmax_ukernel_7x__neon_c16_acc2’:
/home/pi/work/tflite_build/xnnpack/src/qs8-gavgpool/gen/7x-minmax-neon-c16-acc2.c:174:5: note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts
     int8x16_t vout0123456789ABCDEF = vcombine_s16(vqmovn_s16(vacc01234567), vqmovn_s16(vacc89ABCDEF));
     ^~~~~~~~~
/home/pi/work/tflite_build/xnnpack/src/qs8-gavgpool/gen/7x-minmax-neon-c16-acc2.c:174:51: error: incompatible type for argument 1 of ‘vcombine_s16’
     int8x16_t vout0123456789ABCDEF = vcombine_s16(vqmovn_s16(vacc01234567), vqmovn_s16(vacc89ABCDEF));

[링크 : https://www.gitmemory.com/issue/tensorflow/tensorflow/47536/809003416]

 

DNN을 빼고 해보면 된다는데

$ cmake ../tensorflow/tensorflow/lite -DTFLITE_ENABLE_GPU=ON -DTFLITE_ENABLE_XNNPACK=OFF

 

안되잖아!?!

[ 41%] Building CXX object CMakeFiles/tensorflow-lite.dir/delegates/gpu/api.cc.o
In file included from /home/pi/work/tensorflow/tensorflow/lite/delegates/gpu/common/util.h:19,
                 from /home/pi/work/tensorflow/tensorflow/lite/delegates/gpu/api.h:45,
                 from /home/pi/work/tensorflow/tensorflow/lite/delegates/gpu/api.cc:16:
/home/pi/work/tensorflow/tensorflow/lite/delegates/gpu/common/types.h:23:10: fatal error: fp16.h: No such file or directory
 #include <fp16.h>
          ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/tensorflow-lite.dir/build.make:188: CMakeFiles/tensorflow-lite.dir/delegates/gpu/api.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1751: CMakeFiles/tensorflow-lite.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

 

+

ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations"
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc \
  -DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++ \
  -DCMAKE_C_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
  -DCMAKE_SYSTEM_NAME=Linux \
  -DCMAKE_SYSTEM_PROCESSOR=armv7 \
  -DTFLITE_ENABLE_GPU=ON -DTFLITE_ENABLE_XNNPACK=OFF \
  ../tensorflow/tensorflow/lite  

 

아래는 크로스컴파일 하는 예

$ curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ mkdir -p ${HOME}/toolchains
$ tar xvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz -C ${HOME}/toolchains

$ ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations"
ARMCC_PREFIX=${HOME}/toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc \
  -DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++ \
  -DCMAKE_C_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
  -DCMAKE_SYSTEM_NAME=Linux \
  -DCMAKE_SYSTEM_PROCESSOR=armv7 \
  ../tensorflow/lite/

[링크 : https://www.tensorflow.org/lite/guide/build_cmake_arm]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

tf release 2.7.0-rc  (0) 2021.10.12
tflite delegate  (0) 2021.10.11
tflite gpu openCL support build fail  (0) 2021.08.31
tf lite cmake  (0) 2021.08.27
tensorflow cross compile  (0) 2021.07.01
tensorflow lite on rpi4 64bit  (0) 2021.06.30
Posted by 구차니

댓글을 달아 주세요

2.4.1 을 사용했었는데 어느새 2.6.0이 나왔네

$ git tag
v2.4.1
v2.4.2
v2.4.3
v2.5.0
v2.5.0-rc0
v2.5.0-rc1
v2.5.0-rc2
v2.5.0-rc3
v2.5.1
v2.6.0
v2.6.0-rc0
v2.6.0-rc1
v2.6.0-rc2

 

18.04에다가 쓰다 보니 cmake 버전이 낮으셔서 빌드도 못한다고 -_ㅠ

~/work/tflite_build$ cmake ../tensorflow/tensorflow/lite
CMake Error at CMakeLists.txt:29 (cmake_minimum_required):
  CMake 3.16 or higher is required.  You are running version 3.10.2


-- Configuring incomplete, errors occurred!

 

2.4.1에서도 TFLITE_ENABLE_GPU가 있나 찾아 볼까?

$ cmake ../tensorflow_src/tensorflow/lite -DTFLITE_ENABLE_GPU=ON


[링크 : https://www.tensorflow.org/lite/guide/build_cmake]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

tflite delegate  (0) 2021.10.11
tflite gpu openCL support build fail  (0) 2021.08.31
tf lite cmake  (0) 2021.08.27
tensorflow cross compile  (0) 2021.07.01
tensorflow lite on rpi4 64bit  (0) 2021.06.30
tensorflow delegate  (0) 2021.06.30
Posted by 구차니

댓글을 달아 주세요

아따 빡세다 -_-

 

컴파일 하는데 libz.so.1이 없다고 하는데

아마도.. 64bit ubuntu라 32bit 용 libz가 없다고 배쨰는 듯

/home/minimonk/work/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../libexec/gcc/arm-linux-gnueabihf/4.8.3/cc1plus: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

$sudo apt-get install lib32z1

[링크 : https://damedame.tistory.com/entry/libzso1-파일을-찾을수-없을때]

 

std::is_trivially_copyable은 c++11 표준이라 gcc 5.x 이상부터 지원하기 때문이라고

In file included from /home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/frontend.h:30:0,
                 from /home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/ruy.h:23,
                 from ./tensorflow/lite/kernels/cpu_backend_gemm_ruy.h:21,
                 from ./tensorflow/lite/kernels/cpu_backend_gemm.h:25,
                 from ./tensorflow/lite/kernels/internal/optimized/optimized_ops.h:45,
                 from tensorflow/lite/kernels/audio_spectrogram.cc:24:
/home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/create_trmul_params.h: In function ‘void ruy::detail::FinalizeMulParams(const ruy::MulParams<AccumScalar, DstScalar>&, ruy::ChannelDimension, ruy::Ctx*, ruy::TrMulParams*)’:
/home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/create_trmul_params.h:388:17: error: ‘is_trivially_copyable’ is not a member of ‘std’
   static_assert(std::is_trivially_copyable<MulParamsType>::value, "");
                 ^
/home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/create_trmul_params.h:388:57: error: expected primary-expression before ‘>’ token
   static_assert(std::is_trivially_copyable<MulParamsType>::value, "");
                                                         ^
/home/minimonk/work/tensorflow/tensorflow/lite/tools/make/downloads/ruy/ruy/create_trmul_params.h:388:58: error: ‘::value’ has not been declared
   static_assert(std::is_trivially_copyable<MulParamsType>::value, "");
                                                          ^

[링크 : https://stackoverflow.com/questions/25123458/is-trivially-copyable-is-not-a-member-of-std]

 

예라이... -_-

$ arm-linux-gnueabihf-g++ --version
arm-linux-gnueabihf-g++ (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) 4.8.3 20140106 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

$ sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

[링크 : https://blog.thinkbee.kr/linux/crosscompile-arm/]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

tflite gpu openCL support build fail  (0) 2021.08.31
tf lite cmake  (0) 2021.08.27
tensorflow cross compile  (0) 2021.07.01
tensorflow lite on rpi4 64bit  (0) 2021.06.30
tensorflow delegate  (0) 2021.06.30
tflite typed_tensor(), tensor()  (0) 2021.06.25
Posted by 구차니

댓글을 달아 주세요