SPEC CPU 2017 x86_64 Ubuntu 22.04 LTS LLVM 16.0.6 编译 intrate intspeed
源码编译llvm
下载源码
yeqiang@yeqiang-MS-7B23:~/Downloads/src$ git clone --depth=1 -b 7cbf1a2 https://github.com/llvm/llvm-project
正克隆到 'llvm-project'...
warning: 不能发现要克隆的远程分支 7cbf1a2。
fatal: 远程分支 7cbf1a2 在上游 origin 未发现
yeqiang@yeqiang-MS-7B23:~/Downloads/src$ git clone --depth=1 -b llvmorg-16.0.6 https://github.com/llvm/llvm-project
正克隆到 'llvm-project'...
remote: Enumerating objects: 132947, done.
remote: Counting objects: 100% (132947/132947), done.
remote: Compressing objects: 100% (107072/107072), done.
remote: Total 132947 (delta 28313), reused 67422 (delta 21784), pack-reused 0
接收对象中: 100% (132947/132947), 187.34 MiB | 961.00 KiB/s, 完成.
处理 delta 中: 100% (28313/28313), 完成.
注意:正在切换到 '7cbf1a2591520c2491aa35339f227775f4d3adf6'。您正处于分离头指针状态。您可以查看、做试验性的修改及提交,并且您可以在切换
回一个分支时,丢弃在此状态下所做的提交而不对分支造成影响。如果您想要通过创建分支来保留在此状态下所做的提交,您可以通过在 switch 命令
中添加参数 -c 来实现(现在或稍后)。例如:git switch -c <新分支名>或者撤销此操作:git switch -通过将配置变量 advice.detachedHead 设置为 false 来关闭此建议正在更新文件: 100% (126307/126307), 完成.
编译安装llvm
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ cmake ../llvm -DCMAKE_BUILD_TYPE=Release
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ make -j4
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build$ sudo make install
编译安装clang
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build-clang
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build-clang/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ cmake ../clang
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ make -j6
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-clang$ sudo make install
编译安装openmp
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ mkdir build-openmp
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project$ cd build-openmp/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ cmake ../openmp/
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ make -j6
yeqiang@yeqiang-MS-7B23:~/Downloads/src/llvm-project/build-openmp$ sudo make install
x86_64 编译intrate,intspeed
gcc-llvm-intrate-intspeed.patch 内容
*** Example-gcc-linux-x86.cfg Fri May 4 20:53:19 2018
--- gcc-llvm.cfg Wed Jul 26 15:43:37 2023
*************** default:
*** 145,153 ****preENV_LD_LIBRARY_PATH = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64#preENV_LD_LIBRARY_PATH = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64:%{ENV_LD_LIBRARY_PATH}SPECLANG = %{gcc_dir}/bin/
! CC = $(SPECLANG)gcc -std=c99 %{model}
! CXX = $(SPECLANG)g++ -std=c++03 %{model}
! FC = $(SPECLANG)gfortran %{model}# How to say "Show me your version, please"CC_VERSION_OPTION = -vCXX_VERSION_OPTION = -v
--- 145,153 ----preENV_LD_LIBRARY_PATH = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64#preENV_LD_LIBRARY_PATH = %{gcc_dir}/lib64/:%{gcc_dir}/lib/:/lib64:%{ENV_LD_LIBRARY_PATH}SPECLANG = %{gcc_dir}/bin/
! CC = /usr/local/bin/clang %{model}
! CXX = /usr/local/bin/clang++ %{model}
! FC = gfortran %{model}# How to say "Show me your version, please"CC_VERSION_OPTION = -vCXX_VERSION_OPTION = -v
*************** default: # data model appl
*** 184,193 ****
--- 184,201 ----%endifPORTABILITY = -DSPEC_%{os}_%{suffix}+ # lex.expryy.cc:816:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
+ 520.omnetpp_r:
+ CXXPORTABILITY = -Wno-error=register
+ 521.wrf_r,621.wrf_s: #lang='F,C'CPORTABILITY = -DSPEC_CASE_FLAGFPORTABILITY = -fconvert=big-endian+ # process *** Error building 525.x264_r base
+ 525.x264_r:
+ CPORTABILITY = -fcommon
+ 523.xalancbmk_r,623.xalancbmk_s: #lang='CXX'PORTABILITY = -DSPEC_%{os}*************** default: # data model appl
*** 197,206 ****
--- 205,232 ----527.cam4_r,627.cam4_s: #lang='F,C'PORTABILITY = -DSPEC_CASE_FLAG+ # *** Error building 620.omnetpp_s base
+ 620.omnetpp_s:
+ CXXPORTABILITY = -Wno-error=register
+
+ # *** Error building 625.x264_s base, /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22
+ 625.x264_s:
+ PORTABILITY = -fcommon
+ 628.pop2_s: #lang='F,C'CPORTABILITY = -DSPEC_CASE_FLAGFPORTABILITY = -fconvert=big-endian+ # Build errors for fprate: 521.wrf_r(base; CE), 527.cam4_r(base; CE) Error: Type mismatch between actual argument
+ 521.wrf_r:
+ FPORTABILITY = -fallow-argument-mismatch
+ 527.cam4_r:
+ FPORTABILITY = -fallow-argument-mismatch
+ # 526.blender_r(base; CE) error: call to undeclared function 'kill'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ # error: unknown type name 'mode_t'; did you mean '__mode_t'
+ 526.blender_r:
+ PORTABILITY = -Wno-error,-Wno-sign-conversion -Wno-sign-conversion -Wno-constant-conversion-Wno-implicit-function-declaration -Wno-int-conversion
+ #-------- Tuning Flags common to Base and Peak --------------------------------*************** default: # data model appl
*** 234,240 ****# switches here. See also 'About the -fno switches' below.#default=base: # flags for all base
! OPTIMIZE = -g -O3 -march=native -fno-unsafe-math-optimizations -fno-tree-loop-vectorizeintrate,intspeed=base: # flags for integer baseEXTRA_COPTIMIZE = -fno-strict-aliasing -fgnu89-inline
--- 260,266 ----# switches here. See also 'About the -fno switches' below.#default=base: # flags for all base
! OPTIMIZE = -g -O3 -march=native -fno-unsafe-math-optimizationsintrate,intspeed=base: # flags for integer baseEXTRA_COPTIMIZE = -fno-strict-aliasing -fgnu89-inline
打补丁,编译
cd /opt/cpu2017/
cd config
cp Example-gcc-linux-x86.cfg gcc-llvm.cfg
patch -p0 < ../gcc-llvm-intrate-intspeed.patch
cd /opt/cpu2017
runcpu -c gcc-llvm.cfg --action build intrate intspeed
编译成功日志
root@yeqiang-MS-7B23:/opt/cpu2017/config# cd /opt/cpu2017/
root@yeqiang-MS-7B23:/opt/cpu2017# source shrc
root@yeqiang-MS-7B23:/opt/cpu2017# runcpu -c gcc-llvm.cfg --action build intrate intspeed
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2017 Standard Performance Evaluation Corporation (SPEC)runcpu v5825
Using 'linux-x86_64' tools
Reading file manifests... read 32272 entries from 2 files in 0.08s (403885 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.
Reading config file '/opt/cpu2017/config/gcc-llvm.cfg'
2 configurations selected:Action Benchmarks
------ ----------------------------------------------------------------------
build intrate
build intspeed
-------------------------------------------------------------------------------Setting up environment for running intrate...
Starting runcpu for intrate...
Running "specperl /opt/cpu2017/bin/sysinfo" to gather system information.
sysinfo: r5974 of 2018-05-19 (9bcde8f2999c33d61f64985e45859ea9)
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting OS info
sysinfo: ...getting CPU vulnerability status from the kernel
sysinfo: ...getting disk info
sysinfo: ...trying to get DIMM info from dmidecode
Retrieving flags file (/opt/cpu2017/config/flags/gcc.xml)...
Benchmarks selected: 500.perlbench_r, 502.gcc_r, 505.mcf_r, 520.omnetpp_r, 523.xalancbmk_r, 525.x264_r, 531.deepsjeng_r, 541.leela_r, 548.exchange2_r, 557.xz_r, 999.specrand_ir
Compiling BinariesBuilding 500.perlbench_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:45:24]Building 502.gcc_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:46:03]Building 505.mcf_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:50:02]Building 520.omnetpp_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:50:04]Building 523.xalancbmk_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 15:55:30]Building 525.x264_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:21]Building 531.deepsjeng_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:46]Building 541.leela_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:07:55]Building 548.exchange2_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:38]Building 557.xz_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:47]Building 999.specrand_ir base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:53]Build successes for intrate: 500.perlbench_r(base), 502.gcc_r(base), 505.mcf_r(base), 520.omnetpp_r(base), 523.xalancbmk_r(base), 525.x264_r(base), 531.deepsjeng_r(base), 541.leela_r(base), 548.exchange2_r(base), 557.xz_r(base), 999.specrand_ir(base)
Build errors for intrate: NoneBuild Complete
-------------------------------------------------------------------------------Setting up environment for running intspeed...
Starting runcpu for intspeed...
Running "specperl /opt/cpu2017/bin/sysinfo" to gather system information.
sysinfo: r5974 of 2018-05-19 (9bcde8f2999c33d61f64985e45859ea9)
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting OS info
sysinfo: ...getting CPU vulnerability status from the kernel
sysinfo: ...getting disk info
sysinfo: ...trying to get DIMM info from dmidecode
Retrieving flags file (/opt/cpu2017/config/flags/gcc.xml)...
Benchmarks selected: 600.perlbench_s, 602.gcc_s, 605.mcf_s, 620.omnetpp_s, 623.xalancbmk_s, 625.x264_s, 631.deepsjeng_s, 641.leela_s, 648.exchange2_s, 657.xz_s, 998.specrand_is
Compiling BinariesBuilding 600.perlbench_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:08:55]Building 602.gcc_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:09:35]Building 605.mcf_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:13:38]Building 620.omnetpp_s base mytest-m64: (build_base_mytest-m64.0001) [2023-07-26 16:13:40]Building 623.xalancbmk_s base mytest-m64: (build_base_mytest-m64.0001) [2023-07-26 16:19:12]Building 625.x264_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:30:56]Building 631.deepsjeng_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:31:20]Building 641.leela_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:31:29]Building 648.exchange2_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:11]Building 657.xz_s base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:20]Building 998.specrand_is base mytest-m64: (build_base_mytest-m64.0000) [2023-07-26 16:32:26]Build successes for intspeed: 600.perlbench_s(base), 602.gcc_s(base), 605.mcf_s(base), 620.omnetpp_s(base), 623.xalancbmk_s(base), 625.x264_s(base), 631.deepsjeng_s(base), 641.leela_s(base), 648.exchange2_s(base), 657.xz_s(base), 998.specrand_is(base)
Build errors for intspeed: NoneBuild Complete
The log for this run is in /opt/cpu2017/result/CPU2017.031.logruncpu finished at 2023-07-26 16:32:28; 2825 total seconds elapsed
故障处理
*** Error building 600.perlbench_s base /usr/bin/ld: cannot find -lomp: No such file or directory
安装openmp,其中有日志
-- Installing: /usr/local/lib/libomp.so
相关文章:
SPEC CPU 2017 x86_64 Ubuntu 22.04 LTS LLVM 16.0.6 编译 intrate intspeed
源码编译llvm 下载源码 yeqiangyeqiang-MS-7B23:~/Downloads/src$ git clone --depth1 -b 7cbf1a2 https://github.com/llvm/llvm-project 正克隆到 llvm-project... warning: 不能发现要克隆的远程分支 7cbf1a2。 fatal: 远程分支 7cbf1a2 在上游 origin 未发现 yeqiangyeqi…...
java备忘录模式
在Java中,备忘录模式(Memento Design Pattern)用于捕获一个对象的内部状态并在该对象之外保存这个状态。备忘录模式允许在后续需要时将对象恢复到之前保存的状态,而不会暴露其内部结构。 备忘录模式包含以下主要角色:…...
iOS--runtime
什么是Runtime runtime是由C和C、汇编实现的一套API,为OC语言加入了面向对象、运行时的功能运行时(runtime)将数据类型的确定由编译时推迟到了运行时平时编写的OC代码,在程序运行过程中,最终会转换成runtime的C语言代…...
06. 管理Docker容器数据
目录 1、前言 2、Docker实现数据管理的方式 2.1、数据卷(Data Volumes) 2.2、数据卷容器(Data Volume Containers) 3、简单示例 3.1、数据卷示例 3.2、数据卷容器示例 1、前言 在生产环境中使用 Docker,一方面…...
计算机视觉常用数据集介绍
1 MINIST MINIST 数据集应该算是CV里面最早流行的数据了,相当于CV领域的Hello World。该数据包含70000张手写数字图像,其中60000张用于train, 10000张用于test, 并且都有相应的label。图像的尺寸比较小, 为28x28。 数…...
Arcgis画等高线
目录 数据准备绘制等高线3D等高线今天我们将学习如何在ArcGIS中绘制等高线地图。等高线地图是地理信息系统中常见的数据表现形式,它通过等高线将地形起伏展现得一目了然,不仅美观,还能提供重要的地形信息。 数据准备 在开始之前,确保已经准备好了高程数据,它通常以栅格数…...
abp vnext4.3版本托管到iis同时支持http和https协议
在项目上本来一直使用的是http协议,后来因为安全和一些其他原因需要上https协议,如果发布项目之后想同时兼容http和https协议需要更改一下配置信息,下面一起看一下: 1.安装服务器证书 首先你需要先申请一张服务器证书,申请后将证…...
2023年全网电视盒子无线ADB修改桌面(无需ROOT)
前言 1.主要是为了解决电视盒子等安卓设备无法卸载或者停用原始桌面导致无法选用第三方桌面。 解决方案 1.首先自行下载我提供的网盘APK 2.点击打开中国移动云盘 3.不管你是通过U盘还是局域网共享能够让你的电视安装第三方应用,毕竟每个品牌的安装方法不尽相同…...
什么是Java中的Maven?
Java中的Maven,可以简单理解为“一个神奇的工具”,它可以自动帮你管理Java项目的依赖关系,让你不再为手动下载、配置各种库而烦恼。想象一下,你正在写一个Java项目,突然发现需要引入一个名为"第三方库"的模块…...
【C++】总结7
文章目录 函数指针C中类成员的访问权限和继承权限问题定义和声明的区别C中类的静态成员与普通成员的区别是什么?虚函数为什么不能重载为内联函数?对ifdef endif的理解如何在不使用额外空间的情况下,交换两个数? 函数指针 什么是函…...
【前端知识】React 基础巩固(四十二)——React Hooks的介绍
React 基础巩固(四十二)——React Hooks的介绍 一、为什么需要Hook? Hook 是 React 16.8 的新增特性,它可以让我们在不编写class的情况下使用state以及其他的React特性(比如生命周期)。 class组件 VS 函数式组件: class的优势…...
adb命令丨adb push命令大全_adb操控手机和指令
【ADB命令】adb push命令总结 adb push命令大全操控手机和指令 运行在 Android 设备上的adb后台进程 执行 adb shell ps | grep adbd ,可以找到该后台进程,windows 请使用 findstr 替代 grep [xuxu:~]$ adb shell ps | grep adbd root 23227 1 6672 8…...
【腾讯云 Cloud Studio 实战训练营】沉浸式体验编写一个博客系统
文章目录 前言项目中技术栈新建工作空间登录(注册)Cloud Studio 账号:进入 Cloud Studio 控制台:配置工作空间参数:确认并创建工作空间:项目搭建 配置nuxt 脚手架运行项目报错信息解决错误脚手架运行预览问题 开启博客代码配置lay…...
手机视频聊天分享
在人际互动的手机APP中,增加语音视频聊天功能是一个常见的需求。而现在,更进一步,在某些场景下,我们需要能将自己的手机屏幕分享给他人,或者是观看他人的手机屏幕。那么,这些常见的功能是如何实现的了&…...
神经网络小记-优化器
优化器是深度学习中用于优化神经网络模型的一类算法,其主要作用是根据模型的损失函数来调整模型的参数,使得模型能够更好地拟合训练数据,提高模型的性能和泛化能力。优化器在训练过程中通过不断更新模型的参数,使模型逐步接近最优…...
200+行代码写一个简易的Qt界面贪吃蛇
照例先演示一下: 一个简单的Qt贪吃蛇,所有的图片都是我自己画的(得意)。 大致的运行逻辑和之前那个200行写一个C小黑窗贪吃蛇差不多,因此在写这个项目的时候,大多情况是在想怎么通过Qt给展现出来。 背景图…...
redis中使用bloomfilter的白名单功能解决缓存穿透问题
一 缓存预热 1.1 缓存预热 将需要的数据提前缓存到缓存redis中,可以在服务启动时候,或者在使用前一天完成数据的同步等操作。保证后续能够正常使用。 1.2 缓存穿透 在redis中,查询redis缓存数据没有内容,接着查询mysql数据库&…...
Spring Boot 2.7.8以后mysql-connector-java与mysql-connector-j
错误信息 如果升级到Spring Boot 2.7.8,可以看到因为找不到mysql-connector-java依赖而出现错误。 配置: <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId>&l…...
03|「如何写好一个 Prompt」
前言 Prompt 文章目录 前言一、通用模板和范式1. 组成2. 要求1)文字描述2)注意标点符号 一、通用模板和范式 1. 组成 指令(角色) 生成主体 额外要求 指令:模型具体完成的任务描述。例如,翻译一段文字&…...
关于提示词 Prompt
Prompt原则 原则1 提供清晰明确的指示 注意在提示词中添加正确的分割符号 prompt """ 请给出下面文本的摘要: <你的文本> """可以指定输出格式,如:Json、HTML提示词中可以提供少量实例,…...
[特殊字符] 智能合约中的数据是如何在区块链中保持一致的?
🧠 智能合约中的数据是如何在区块链中保持一致的? 为什么所有区块链节点都能得出相同结果?合约调用这么复杂,状态真能保持一致吗?本篇带你从底层视角理解“状态一致性”的真相。 一、智能合约的数据存储在哪里…...
业务系统对接大模型的基础方案:架构设计与关键步骤
业务系统对接大模型:架构设计与关键步骤 在当今数字化转型的浪潮中,大语言模型(LLM)已成为企业提升业务效率和创新能力的关键技术之一。将大模型集成到业务系统中,不仅可以优化用户体验,还能为业务决策提供…...
(二)TensorRT-LLM | 模型导出(v0.20.0rc3)
0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述,后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作,其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...
UDP(Echoserver)
网络命令 Ping 命令 检测网络是否连通 使用方法: ping -c 次数 网址ping -c 3 www.baidu.comnetstat 命令 netstat 是一个用来查看网络状态的重要工具. 语法:netstat [选项] 功能:查看网络状态 常用选项: n 拒绝显示别名&#…...
使用van-uploader 的UI组件,结合vue2如何实现图片上传组件的封装
以下是基于 vant-ui(适配 Vue2 版本 )实现截图中照片上传预览、删除功能,并封装成可复用组件的完整代码,包含样式和逻辑实现,可直接在 Vue2 项目中使用: 1. 封装的图片上传组件 ImageUploader.vue <te…...
PL0语法,分析器实现!
简介 PL/0 是一种简单的编程语言,通常用于教学编译原理。它的语法结构清晰,功能包括常量定义、变量声明、过程(子程序)定义以及基本的控制结构(如条件语句和循环语句)。 PL/0 语法规范 PL/0 是一种教学用的小型编程语言,由 Niklaus Wirth 设计,用于展示编译原理的核…...
return this;返回的是谁
一个审批系统的示例来演示责任链模式的实现。假设公司需要处理不同金额的采购申请,不同级别的经理有不同的审批权限: // 抽象处理者:审批者 abstract class Approver {protected Approver successor; // 下一个处理者// 设置下一个处理者pub…...
Go 并发编程基础:通道(Channel)的使用
在 Go 中,Channel 是 Goroutine 之间通信的核心机制。它提供了一个线程安全的通信方式,用于在多个 Goroutine 之间传递数据,从而实现高效的并发编程。 本章将介绍 Channel 的基本概念、用法、缓冲、关闭机制以及 select 的使用。 一、Channel…...
深度学习之模型压缩三驾马车:模型剪枝、模型量化、知识蒸馏
一、引言 在深度学习中,我们训练出的神经网络往往非常庞大(比如像 ResNet、YOLOv8、Vision Transformer),虽然精度很高,但“太重”了,运行起来很慢,占用内存大,不适合部署到手机、摄…...
从数据报表到决策大脑:AI重构电商决策链条
在传统电商运营中,决策链条往往止步于“数据报表层”:BI工具整合历史数据,生成滞后一周甚至更久的销售分析,运营团队凭经验预判需求。当爆款突然断货、促销库存积压时,企业才惊觉标准化BI的决策时差正成为增长瓶颈。 一…...
