先ln -s 相关的so(apt_pkg.so、_gi.so)
参考这里https://blog.csdn.net/qq_30065853/article/details/122414615
和这里https://stackoverflow.com/questions/70508775/error-could-not-build-wheels-for-pycairo-which-is-required-to-install-pyprojec
bash: add-apt-repository: command not found
升级G++-11 参考这里https://stackoverflow.com/questions/67298443/when-gcc-11-will-appear-in-ubuntu-repositories
升级G++-11(方法2):
安装clang-12
安装GPU驱动
安装CUDA https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html
tar 解压cuda后安装至全局
测试OpenCL
测试nvcc
```
```
安装NCCL
安装bazel https://bazel.build/install/ubuntu
https://github.com/second-state/WasmEdge-tensorflow-tools
tflite
2
conda快速安装cuda11+cudnn8并将其加载系统变量 以及快速安装tensorflow
1、https://github.com/jiangxinyang227/nlp_tflite
2、https://github.com/ValYouW/tflite-dist/blob/master/build-android.sh
3、https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/guide/build_cmake.md
root@iotsc-waynexzhou:~/code/build# ./minimal ~/code/linear.tflite
Activating GPU...
INFO: Created TensorFlow Lite delegate for GPU.
INFO: Initialized OpenCL -based API.
INFO: Created 1 GPU delegate kernels.
=== Pre-invoke Interpreter State ===
Interpreter has 1 subgraphs.
-----------Subgraph-0 has 10 tensors and 2 nodes------------
1 Inputs: [0 ] -> 4B (0 .00MB)
1 Outputs: [3 ] -> 4B (0 .00MB)
Tensor ID Name Type AllocType Size (Bytes /MB) Shape MemAddr-Offset
Tensor 0 serving_default_dense_... kTfLiteFloat32 kTfLiteArenaRw 4 / 0.00 [1 ,1 ] [0 , 4 )
Tensor 1 sequential/dense/BiasA... kTfLiteFloat32 kTfLiteMmapRo 4 / 0.00 [1 ] [24 , 28 )
Tensor 2 sequential/dense/MatMul kTfLiteFloat32 kTfLiteMmapRo 4 / 0.00 [1 ,1 ] [0 , 4 )
Tensor 3 StatefulPartitionedCall:0 kTfLiteFloat32 kTfLiteArenaRw 4 / 0.00 [1 ,1 ] [64 , 68 )
Tensor 4 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 5 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 6 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 7 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 8 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 9 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
kTfLiteArenaRw Info:
Tensor 0 has the max size 4 bytes (0.000 MB).
This memory arena is estimated as[ 0x562a383a8644 , 0x562a383a8600 ), taking 68 bytes (0.000 MB).
One possible set of tensors that have non -overlapping memory spaces with each other, and they take up the whole arena:
Tensor 0 -> 3 .
kTfLiteArenaRwPersistent Info: not holding any allocation.
kTfLiteMmapRo Info:
Tensor 1 has the max size 4 bytes (0.000 MB).
This memory arena is estimated as[ 0x7f14352b91dc , 0x7f14352b91c0 ), taking 28 bytes (0.000 MB).
One possible set of tensors that have non -overlapping memory spaces with each other, and they take up the whole arena:
Tensor 2 -> 1 .
kTfLiteDynamic Info: not holding any allocation.
Node 0 Operator Builtin Code 9 FULLY_CONNECTED (delegated by node 1 )
3 Input Tensors:[0 ,2 ,1 ] -> 0B (0 .00MB)
1 Output Tensors:[3 ] -> 0B (0 .00MB)
Node 1 Operator Custom Name TfLiteGpuDelegateV2
3 Input Tensors:[0 -2 ] -> 12B (0 .00MB)
1 Output Tensors:[3 ] -> 4B (0 .00MB)
Execution plan as the list of 1 nodes invoked in -order: [1 ]
Among these nodes in the execution plan:
Node 1 is a TfLiteGpuDelegateV2 node (0x562a37a54f70 ), which has delegated 1 nodes: [0 ]
--------------Subgraph-0 dump has completed--------------
--------------Memory Arena Status Start--------------
Total memory usage: 324 bytes (0.000 MB)
- Total arena memory usage: 324 bytes (0.000 MB)
- Total dynamic memory usage: 0 bytes (0.000 MB)
Subgraph# 0 Arena (Normal) 196 (60.49 %)
Subgraph# 0 Arena (Persistent) 128 (39.51 %)
--------------Memory Arena Status End--------------
=== Post-invoke Interpreter State ===
Interpreter has 1 subgraphs.
-----------Subgraph-0 has 10 tensors and 2 nodes------------
1 Inputs: [0 ] -> 4B (0 .00MB)
1 Outputs: [3 ] -> 4B (0 .00MB)
Tensor ID Name Type AllocType Size (Bytes /MB) Shape MemAddr-Offset
Tensor 0 serving_default_dense_... kTfLiteFloat32 kTfLiteArenaRw 4 / 0.00 [1 ,1 ] [0 , 4 )
Tensor 1 sequential/dense/BiasA... kTfLiteFloat32 kTfLiteMmapRo 4 / 0.00 [1 ] [24 , 28 )
Tensor 2 sequential/dense/MatMul kTfLiteFloat32 kTfLiteMmapRo 4 / 0.00 [1 ,1 ] [0 , 4 )
Tensor 3 StatefulPartitionedCall:0 kTfLiteFloat32 kTfLiteArenaRw 4 / 0.00 [1 ,1 ] [64 , 68 )
Tensor 4 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 5 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 6 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 7 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 8 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
Tensor 9 (nil) kTfLiteNoType kTfLiteMemNone 0 / 0.00 (null ) [-1 , -1 )
kTfLiteArenaRw Info:
Tensor 0 has the max size 4 bytes (0.000 MB).
This memory arena is estimated as[ 0x562a383a8644 , 0x562a383a8600 ), taking 68 bytes (0.000 MB).
One possible set of tensors that have non -overlapping memory spaces with each other, and they take up the whole arena:
Tensor 0 -> 3 .
kTfLiteArenaRwPersistent Info: not holding any allocation.
kTfLiteMmapRo Info:
Tensor 1 has the max size 4 bytes (0.000 MB).
This memory arena is estimated as[ 0x7f14352b91dc , 0x7f14352b91c0 ), taking 28 bytes (0.000 MB).
One possible set of tensors that have non -overlapping memory spaces with each other, and they take up the whole arena:
Tensor 2 -> 1 .
kTfLiteDynamic Info: not holding any allocation.
Node 0 Operator Builtin Code 9 FULLY_CONNECTED (delegated by node 1 )
3 Input Tensors:[0 ,2 ,1 ] -> 0B (0 .00MB)
1 Output Tensors:[3 ] -> 0B (0 .00MB)
Node 1 Operator Custom Name TfLiteGpuDelegateV2
3 Input Tensors:[0 -2 ] -> 12B (0 .00MB)
1 Output Tensors:[3 ] -> 4B (0 .00MB)
Execution plan as the list of 1 nodes invoked in -order: [1 ]
Among these nodes in the execution plan:
Node 1 is a TfLiteGpuDelegateV2 node (0x562a37a54f70 ), which has delegated 1 nodes: [0 ]
--------------Subgraph-0 dump has completed--------------
--------------Memory Arena Status Start--------------
Total memory usage: 324 bytes (0.000 MB)
- Total arena memory usage: 324 bytes (0.000 MB)
- Total dynamic memory usage: 0 bytes (0.000 MB)
Subgraph# 0 Arena (Normal) 196 (60.49 %)
Subgraph# 0 Arena (Persistent) 128 (39.51 %)
--------------Memory Arena Status End--------------
npm 重装(`GLIBC_2.28' not found) https://stackoverflow.com/questions/72921215/getting-glibc-2-28-not-found
install vtune-gui dependencies
OpenWhisk GPU
https://medium.com/openwhisk/using-gpus-with-apache-openwhisk-c6773efcccfb
https://blog.csdn.net/henmj/article/details/125015847
网络端口错误
https://blog.csdn.net/qq_29274865/article/details/116016449
https://blog.csdn.net/bowenlaw/article/details/105358102
https://stackoverflow.com/questions/35220654/how-to-verify-if-nginx-is-running-or-not
Temporary failure resolving 'archive.ubuntu.com' https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error
https://blog.csdn.net/sculpta/article/details/108130992
https://blog.csdn.net/qq_19922839/article/details/117488663
PERF权限不足
https://blog.eastonman.com/blog/2021/02/use-perf/
https://blog.csdn.net/zaf0516/article/details/122617623
https://coleflowers.github.io/2015/06/28/github-note.html
https://github.com/tensorflow/tensorflow/issues/48407 https://www.tensorflow.org/lite/android/delegates/gpu#c++ https://stackoverflow.com/questions/56837288/tensorflow-lite-c-api-example-for-inference https://medium.com/analytics-vidhya/inference-tensorflow2-model-in-c-aa73a6af41cf
https://github.com/kashimAstro/tf_inference https://github.com/google-coral/tflite https://github.com/jiangxinyang227/nlp_tflite https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/gpu/README.md
[Has 3 dynamic libs:](https://github.com/ValYouW/tflite-dist) libtensorflowlite.so - C++ library libtensorflowlite_c.so - C library libtensorflowlite_gpu_delegate.so - The C++ GPU delegate library
https://www.tensorflow.org/lite/performance/gpu#c(支持到-2.3.0-版) https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/guide/build_cmake.md https://zhuanlan.zhihu.com/p/53393267
https://stackoverflow.com/questions/71875103/compile-tflite-script-with-cmake-cmakelists-for-gpu https://github.com/tensorflow/tensorflow/issues/38746 https://github.com/tensorflow/tensorflow/issues/48407 https://github.com/tensorflow/tensorflow/issues/58497 [!!!] bazel -c opt --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE tensorflow/lite/delegates/gpu:libtensorflowlite_gpu_delegate.so --verbose_failures -DTFLITE_ENABLE_GPU=ON
Unfortunately, TFLite GPU delegate in official Tensorflow repo does not support Ubuntu.
https://blog.csdn.net/u013701860/article/details/125009412
安装opencl https://matpool.medium.com/%E7%9F%A9%E6%B1%A0%E4%BA%91%E4%B8%8Anvidia-opencl%E5%AE%89%E8%A3%85%E5%8F%8A%E6%B5%8B%E8%AF%95%E6%95%99%E7%A8%8B-6cbb616cc30d sudo apt -y install nvidia-opencl-dev [ocl-icd-libopencl1] https://www.cnblogs.com/vactor/p/9286425.html !!! clinfo测试
openGL https://zoomadmin.com/HowToInstall/UbuntuPackage/libhugs-opengl-bundled https://medium.com/geekculture/a-beginners-guide-to-setup-opengl-in-linux-debian-2bfe02ccd1e https://www.cntofu.com/book/46/opengl/ubuntuxia_an_zhuang_opengl_tu_xing_ku.md https://gist.github.com/Mluckydwyer/8df7782b1a6a040e5d01305222149f3c
https://gist.github.com/ksopyla/bf74e8ce2683460d8de6e0dc389fc7f5
__EOF__
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库