当前位置: 首页 > wzjs >正文

爱心捐赠网站怎么做成都网站建设网络

爱心捐赠网站怎么做,成都网站建设网络,网站建设列入什么会计科目,华企在线网站建设服务器信息: aarch64架构 ubuntu20.04 nvidia T4卡 编译onnxruntime-gpu前置条件: 已经安装合适的cuda已经安装合适的cudnn已经安装合适的cmake 源码编译onnxruntime-gpu的步骤 1. 下载源码 git clone --recursive https://github.com/microsoft/o…

服务器信息:

aarch64架构
ubuntu20.04
nvidia T4卡

编译onnxruntime-gpu前置条件:

  1. 已经安装合适的cuda
  2. 已经安装合适的cudnn
  3. 已经安装合适的cmake

源码编译onnxruntime-gpu的步骤

1. 下载源码

git clone --recursive https://github.com/microsoft/onnxruntime.git
cd onnxruntime

2. 选择版本

然后根据需要安装的onnxruntime-gpu版本号,切换版本

git checkout v1.16.3

3. 执行bulid指令

在onnxruntime根目录下执行:

./build.sh \--config Release \--update \--build \--parallel \--build_wheel \--use_cuda \--allow_running_as_root \--cuda_home /usr/local/cuda \--cudnn_home /usr/lib/aarch64-linux-gnu \--skip_tests \--cmake_extra_defines \CMAKE_CUDA_ARCHITECTURES=75 \onnxruntime_ENABLE_NVTX_PROFILE=ON \onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION=OFF \onnxruntime_USE_FLASH_ATTENTION=OFF \onnxruntime_BUILD_UNIT_TESTS=OFF \CMAKE_POLICY_VERSION_MINIMUM=3.5

4. 报错解决方式

4.1 算力设置不匹配
[ 53%] Built target onnxruntime_optimizer
make: *** [Makefile:166: all] Error 2
Traceback (most recent call last):File "/home/tc/onnxruntime/tools/ci_build/build.py", line 2684, in <module>sys.exit(main())File "/home/tc/onnxruntime/tools/ci_build/build.py", line 2577, in mainbuild_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)File "/home/tc/onnxruntime/tools/ci_build/build.py", line 1487, in build_targetsrun_subprocess(cmd_args, env=env)File "/home/tc/onnxruntime/tools/ci_build/build.py", line 798, in run_subprocessreturn run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)File "/home/tc/onnxruntime/tools/python/util/run.py", line 49, in runcompleted_process = subprocess.run(File "/usr/lib/python3.8/subprocess.py", line 516, in runraise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/tc/cmake-3.26.0-linux-aarch64/bin/cmake', '--build', '/home/tc/onnxruntime/build/Linux/Release', '--config', 'Release', '--', '-j40']' returned non-zero exit status 2.

问题原因:
./bulid.sh的参数CMAKE_CUDA_ARCHITECTURES=87 表示目标 GPU 的计算能力为 8.7,请确认您的硬件是否匹配:
可以直接用AI来查询,T4需要填写75,解决此问题

4.2 下载库文件超时
-- Using src='https://github.com/pytorch/cpuinfo/archive/ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip'
CMake Error at pytorch_cpuinfo-subbuild/pytorch_cpuinfo-populate-prefix/src/pytorch_cpuinfo-populate-stamp/download-pytorch_cpuinfo-populate.cmake:170 (message):Each download failed!error: downloading 'https://github.com/pytorch/cpuinfo/archive/ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip' failedstatus_code: 28status_string: "Timeout was reached"log:--- LOG BEGIN ---Trying 20.205.243.166:443...connect to 20.205.243.166 port 443 failed: Connection timed outFailed to connect to github.com port 443 after 131336 ms: Couldn't connectto serverClosing connection 0--- LOG END ---

问题原因:
下载库文件速度过慢超时
解决方案
手动下载,并放到指定位置,再重新执行编译指令。
以上述报错为例:
网页下载资源,浏览器输入地址自动下载压缩包:

https://github.com/pytorch/cpuinfo/archive/ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip

将下载的 cpuinfo-ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip,解压到相对路径onnxruntime/build/Linux/Release/_deps/pytorch_cpuinfo-subbuild/pytorch_cpuinfo-populate-prefix/src/ 目录下。(报错里会写明需要放置的位置,根据实际情况修改路径)

然后重新执行bulid.sh的指令就可以继续编译。

4.3 不支持BFLOAT16
NVCC_ERROR = nvcc fatal   : Unknown option '-Wstrict-aliasing'NVCC_OUT = 1
CMake Error at CMakeLists.txt:695 (message):The compiler doesn't support BFLOAT16!!!-- Configuring incomplete, errors occurred!
Traceback (most recent call last):File "/home/tc/onnxruntime/tools/ci_build/build.py", line 2998, in <module>sys.exit(main())File "/home/tc/onnxruntime/tools/ci_build/build.py", line 2853, in maingenerate_build_tree(File "/home/tc/onnxruntime/tools/ci_build/build.py", line 1674, in generate_build_treerun_subprocess(File "/home/tc/onnxruntime/tools/ci_build/build.py", line 867, in run_subprocessreturn run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)File "/home/tc/onnxruntime/tools/python/util/run.py", line 49, in runcompleted_process = subprocess.run(File "/usr/lib/python3.8/subprocess.py", line 516, in runraise CalledProcessError(retcode, process.args,

问题原因:
ONNX Runtime 从 v1.17.0 起要求 ARM 架构支持 BFLOAT16 指令集,当前编译器版本不支持。
解决方式一:升级编译器 / 系统环境
官方文档和讨论指出:在 JetPack 5.x (Ubuntu 18.04/20.04) 上编译时,GCC 必须 ≥10 (JetPack 6 对应 Ubuntu 22.04,自带 GCC11+)。也就是说,最简单的解决方案是升级到 JetPack 6 (Ubuntu 22.04/GCC11) 或手动安装较新版本的 GCC(如通过 sudo apt install gcc-11 g+±11 并更新 alternatives)。升级要求:Ubuntu 22.04,不然可能无法直接安装gcc-12 和 g+±12 。
升级后,-march=armv8.2-a+bf16 检查就会通过。表明需要更高版本的编译器以支持 BF16。

  1. 首先,添加包含较新 GCC 版本的 PPA:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update

此 PPA 提供了多个版本的 GCC 和 G++,包括 gcc-12 和 g+±12 。

  1. 安装所需版本的 GCC 和 G++
sudo apt install gcc-12 g++-12
  1. 使用 update-alternatives 设置默认版本
sudo update-alternatives --install /usr/bin/gcc  gcc  /usr/bin/gcc-12 120
sudo update-alternatives --install /usr/bin/g++  g++  /usr/bin/g++-12 120
  1. 如果系统中安装了多个版本的 GCC 和 G++,可以使用以下命令手动选择默认版本:
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
  1. 验证当前版本
gcc --version
g++ --version
  1. 重新编译

解决方式二:修改源码绕过 BFLOAT16 检查
若必须在现有环境下编译,可以手动修改源码跳过 BFLOAT16 检查。在 onnxruntime/cmake/CMakeLists.txt 中找到如下检查段:

check_cxx_compiler_flag(-march=armv8.2-a+bf16 HAS_ARM64_BFLOAT16)
if(NOT HAS_ARM64_BFLOAT16)message(FATAL_ERROR "The compiler doesn't support BFLOAT16!!!")
endif()

修改为:

if(NOT HAS_ARM64_BFLOAT16)#message(WARNING "BFLOAT16 not supported, disabling BF16 optimizations")set(HAS_ARM64_BFLOAT16 TRUE)
endif()

这样跳过了编译器不支持 BF16 的致命错误。不过需要注意:跳过检查后仍可能缺少 BF16 优化代码,性能或功能可能受影响。修改后保存并重新运行 CMake 即可继续编译。

http://www.dtcms.com/wzjs/826307.html

相关文章:

  • 找生意做去哪个网站孝感建设网站
  • 山东省建设厅官方网站网站建设.龙兵
  • 做网站 想做成宽屏的公众号怎么制作流程
  • 网站建设新闻分享有资源的公众号
  • 电子元器件商城网站建设东莞企业网站开发
  • 网站建设与管理 pdf响应式建站网站
  • 郑州网站建设三牛网站有了域名然后怎么做
  • 福州智能建站金蝶软件收费价目表
  • 旅游网站如何建设网站备案号格式说明书
  • 网站建设168枣庄seo外包
  • 做网站后台要学什么百度手游app下载
  • 营销型外贸网站定制2345网址导航应用
  • 杭州网站推广技巧网站免费进入窗口软件2023
  • 搭建企业资料网站临沂建设职业中专学校
  • 网站建设与规划论文长沙口碑最好的装修公司排名
  • 物流公司网站建设有什么要点搭建网站需要多少钱
  • 网站建设评比细则蛋糕网站制作答辩
  • 怎样让自己网站的文章被百度收录商城网站jq楼层响应
  • 北京做药流凤凰网站企业微网站哪家好
  • 网站建设进度报告长沙浏阳最新通告
  • 网站app的区别是什么乡镇可以做门户网站
  • 零基础网站建设教学山东恒昆建设工程有限公司网站
  • 重庆城市建设集团官方网站北京seo业务员
  • 小型企业网站开发现状自己建个网站多少钱
  • 电子商务查询网站宁夏做网站
  • 商品营销推广的方法有哪些seo运营学校
  • 网站项目建设规划书案例wordpress 分类404
  • 常州网站价格3g医院网站模板
  • 滨海做网站需要多少钱自己做的网站可以用于百度推广吗
  • 网站头部导航电脑云桌面下载