Skip to content

Latest commit

 

History

History
818 lines (563 loc) · 54.3 KB

2024-03-01.md

File metadata and controls

818 lines (563 loc) · 54.3 KB

PLCT 开源进展·第 55 期·2024 年 3 月 1 日

卷首语

本期亮点

(请从 RuyiSDK、CNRV、openEuler 等公众号以及相关群聊中汇总素材)

RuyiSDK IDE

RuyiSDK 包管理器

V8

功能更新

Spidermonkey

OpenJDK Upstream

  1. Reviewed JDK-mainline PRs:
  1. Testing before Rampdown/CodeFreeze for LTS versions: OpenJDK 21.0.3 and OpenJDK 17.0.11
  • Run OpenJDK tier1-4 regression tests on Unmatched and Licheepi-4A boards.
  • Run MineCraft and typical Apache softwares (Netbeans, Lucene, Tomcat, Hadoop, Spark)
  1. jdk11u riscv64 backport PR is ready:
  • openjdk/riscv-port-jdk11u#3 (8276799: Implementation of JEP 422: Linux/RISC-V Port)
  • Finished second round of code review and comments are resolved.
  • Performed regression testing on both Unmatched and LicheePi-4A boards.
  • openjdk/riscv-port-jdk11u#6 (8283929: GHA: Add RISC-V build config)
  • openjdk/jdk11u-dev#2549 (8307955: Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs')
  1. JDK-mainline PRs:
  1. JDK17U backport PRs:

OpenJDK RV32G

OpenJDK8 Backporting

OpenCV RISC-V 优化

  • 面向 Packed SIMD (RVP) 扩展的DNN模块热点函数优化工作已被上游接受。在 Tinker V (AndesCore AX45MP) 开发板上测得的数据显示,Int8 模型推理场景能够获得 1.95 倍的性能提升。

    PR #24556: Optimization based on RISC-V P Packed SIMD Extension v0.5.2

GNU Toolchain

Jiawei Chen

Shihua Liao

Yixuan Chen

Yulong Shi

LLVM Monorepo

+- [InstCombine] Canonicalize the fcmp range check idiom into fabs + fcmp llvm/llvm-project#76367 +- [ValueTracking] Merge cannotBeOrderedLessThanZeroImpl into computeKnownFPClass llvm/llvm-project#76360 +- [InstCombine] Fold select with signbit idiom into fabs llvm/llvm-project#76342 +- [ConstraintElim] Simplify MinMaxIntrinsic llvm/llvm-project#75306 +- [InstCombine] Simplify and/or by replacing operands with constants llvm/llvm-project#77231 +- [RISCV] [MC] Add MC layer support for the experimental zabha extension llvm/llvm-project#80005 zabha扩展的MC支持 +- [InstCombine] Simplify commutative compares of symmetric pairs llvm/llvm-project#80134 支持icmp eq/ne min(a, b), max(a, b) -> icmp eq/ne a, b等pattern +- [ConstantRange] Improve ConstantRange::binaryXor llvm/llvm-project#80146 改进constantrange关于xor的计算 +- [RISCV] [ISel] Add codegen support for the experimental zabha extension llvm/llvm-project#80192 zabha的codegen支持 +- [Clang] [CodeGen] Mark _dynamic_cast as willreturn llvm/llvm-project#80409 将dynamic_cast 标记为willreturn以移除无用的调用 +- [InstCombine] Handle isNanOrInf idioms llvm/llvm-project#80414 将bitwise isNanOrInf实现规范为is.fpclass +- [InstCombine] Clean up bitwise folds without one-use check llvm/llvm-project#80587 移除InstCombine中的冗余fold代码 +- [InstCombine] Handle IsInf/IsZero idioms llvm/llvm-project#80607 将bitwise isInf/isZero实现规范为is.fpclass +- [InstCombine] Fix assertion failure in issue80597 llvm/llvm-project#80614 修复llvm/llvm-project#80597 中konwnbits冲突导致断言失败的问题 +- [ValueTracking] [NFC] Pass SimplifyQuery to computeKnownFPClass family llvm/llvm-project#80657 将SimplifyQuery传入computeKnownFPClass以利用DomConditionCache +- [ValueTracking] Compute known FPClass from signbit idiom llvm/llvm-project#80740 利用上下文推导浮点符号 +- [PatternMatch] Add a matching helper m_ElementWiseBitCast. NFC. llvm/llvm-project#80764 增加新的pattern matching helper以减少为了避免错误bitcast的代码重复 +- [InstCombine] Simplify the overflow result of umulov X, X llvm/llvm-project#80796 快速判断X的平方是否无符号溢出 +- [InstCombine] Try to freely invert phi nodes llvm/llvm-project#80804 扩展getfreelyinvertedimpl以支持phi nodes +- [ValueTracking] Compute known FPClass from dominating condition llvm/llvm-project#80941 利用上下文推导浮点类型 +- [InstCombine] Canonicalize fcmp with inf llvm/llvm-project#80986 规范与inf的比较以启用更多优化 +- [InstSimplify] Generalize simplifyAndOrOfFCmps llvm/llvm-project#81027 优化fcmp ord/une和其它fcmp的合并 +- [ValueTracking] Move the isSignBitCheck helper into ValueTracking. NFC. llvm/llvm-project#81704 把isSignBitCheck从InstCombine移到ValueTracking以减少代码重复 +- [InstSimplify] [InstCombine] Remove unnecessary m_c* matchers. llvm/llvm-project#81712 移除无用的可交换匹配,因为立即数总是在RHS +- [ValueTracking] Fix computeKnownFPClass for fpext llvm/llvm-project#81972 修复fpext的fpclass推导中未考虑subnorm->norm的情况 +- [FlattenCFG] Fix the miscompilation where phi nodes exist in the merge point llvm/llvm-project#81987 修复flattencfg中merge point的phi node未正确修改的问题 +- [ConstraintElim] Decompose sext-like insts for signed predicates llvm/llvm-project#82344 在constraintelim中支持sext/zext nneg +- [InstCombine] Support zext nneg in foldLogicCastConstant llvm/llvm-project#82355 在foldLogicCastConstant中支持zext nneg +- [InstCombine] Add support for cast instructions in getFreelyInvertedImpl llvm/llvm-project#82451 在getFreelyInvertedImpl中支持sext/zext nneg/trunc +- [RISCV] [SDAG] Improve codegen of select with constants if zicond is available llvm/llvm-project#82456 改进有zicond时select cond, C1, C2的codegen +- [RISCV] [SDAG] Fold select c, ~x, x into xor -c, x llvm/llvm-project#82462 改进select cond, C, ~C的codegen +- [CVP] Canonicalize signed minmax into unsigned llvm/llvm-project#82478 把smin/smax nneg规范为umin/umax +- [CVP] Refactor processMinMaxIntrinsic to check non-strict predicate in both directions llvm/llvm-project#82596 在优化minmax时检查<=和>=而不是原先的<=和> +- [ValueTracking] Handle more integer intrinsics in propagatesPoison llvm/llvm-project#82749 支持更多intrisic的poison传递 +- [ValueTracking] [NFC] Early exit when enumerating guaranteed well-defined/non-poison operands llvm/llvm-project#82812 移除冗余的临时缓冲区,改善编译时间 +- [InstCombine] Fold umax(smax)/smin(umin) with non-negative constants llvm/llvm-project#82929 支持混合符号min/max的合并 +- [GVN] Drop nsw/nuw flags when replacing the result of a with.overflow intrinsic with a overflowing binary operator llvm/llvm-project#82935 修复https://github.com/llvm/llvm-project/issues/82884中合并后未正确丢弃nuw nsw flag的问题 +- [RISCV][ISel] Combine vector fadd/fsub/fmul with fp extend. (llvm/llvm-project#81248) +- [RISCV][ISel] Remove redundant vmerge for vwsub(u).wv. (llvm/llvm-project#80523) +- [RISCV][Isel] Remove redundant vmerge for the scalable vwadd(u).wv (llvm/llvm-project#80079)

Chunyu Liao

  1. 调研EPI向量化实现方式,pass迁移过程中
  2. 尝试交叉编译spec cpu 2017,验证了flang暂时不支持交叉编译:llvm/llvm-project#82494

Kiva

Yongtai Li

  1. 本地编译spec cpu2017, rv64gc, rv4gcv, rv64gc_zba_zbb_zbs,并提供可运行程序https://mirror.iscas.ac.cn/plct/flang/
  2. 正在尝试解决的521 flang -O3编译错误

LIBCXX Experimental/simd

LuaJIT RV64G Porting

Follow upstream updates, routine maintenance.

gem5

Spike

QEMU

DynamoRIO RV64GC

box64

xctan

ksco

dynarmic

riscv-vector-tests

SAIL/ACT

openArkCompiler community

PLCT实验室的史宁宁依然每周在更新方舟编译器社区周报(OpenArkCompiler Weekly),目前已经更新到第 201 期。

方舟编译器周报每周日晚上通过 Repo、知乎、Bilibili 和邮件列表发布。

MLIR

Buddy Compiler

buddy-mlir

代码仓库:https://github.com/buddy-compiler/buddy-mlir

  • Generate model and params for ResNet example.
  • Add LeNet E2E example.
  • Add verbose mode for torch dynamo compiler.
  • Add static runner utils libraries for RVV environment.

buddy-benchmark

代码仓库:https://github.com/buddy-compiler/buddy-benchmark

  • Add resize2D benchmark.

CAAT

coreboot for riscv

本期没有新的进展。

openocd

本期没有新的进展。

opensbi

  • 改进aclint使支持分离的hartid。1
  • 为jump和payload类型的估计的固件添加相对地址fw_next_address。1
  • 添加单元测试。1
  • 改进用C降低汇编代码实现,规避sbi作为外部库时有多于的死代码。1
  • 添加间接csr和计数器委托相关的扩展支持。1 2
  • 修正hsm启动的一个bug,在唤醒失败后不应该修改hsm状态。1
  • 非对其访问异常添加来自zcb的指令支持。1
  • sbi_domain初始化时的地址对其检测确认符合pmp napot要求。1

u-boot

本期没有新的进展。

Aya Theorem Prover

eBPF

Benchmarking

Arch Linux

Repo: [core] [extra]
Arch name Up-to-date (Ratio%) Outdated Missing Up-to-date (Ratio%) Outdated Missing
x86_64 (baseline) 267 0 0 13635 0 0
x86-64-v2 215 (80.52%) 0 52 7083 (51.95%) 2 6550
x86-64-v3 217 (81.27%) 0 50 7092 (52.01%) 2 6541
x86-64-v4 207 (77.53%) 0 60 6635 (48.66%) 0 7000
i486 117 (43.82%) 140 10 3313 (24.3%) 6021 4301
i686 151 (56.55%) 106 10 5803 (42.56%) 6068 1764
pentium4 154 (57.68%) 104 9 5726 (41.99%) 6053 1856
aarch64 242 (90.64%) 10 15 11167 (81.9%) 258 2210
armv7h 241 (90.26%) 10 16 10745 (78.8%) 473 2417
riscv64 242 (90.64%) 17 8 10966 (80.43%) 2131 538
loong64 120 (44.94%) 139 8 6396 (46.91%) 4114 3125

Upstreamed work:

RevyOS (Debian)

Debian

2024年2月份的主要工作:

  1. 维护 debci 测试机;
  2. 打包,包括 Sail 群包,其他一些 RFP的包
  3. 帮助社区调 t64 的问题

以下是外部链接:

Gentoo

Nixpkgs

openEuler

(可以根据每个人的产出分开,按照人名增加三级缩进,也可以由 leader/mentor 汇总后统一PR)

Fedora

(可以根据每个人的产出分开,按照人名增加三级缩进,也可以由 leader/mentor 汇总后统一PR)

openKylin

openAnolis

RT-Thread

第3测试小队

1. 测试规划、策略和调研

1.1 RuyiSDK

1.1.1 RISC-V 开发板操作系统支持矩阵的测试与维护
1.1.2 RISC-V 图形化编程开发工具调研

1.2 openEuler

目前oe社区QA SIG就提速 mugen pr合入以及issue处理的建议:提交的pr需要贴上RISC-V、X86、Arm三架构的测试测试结果

1.3 基础设施建设

  • 申请和分发K230和Lichee Pi 4A

  • 调研远程RISC-V设备重启方法

2. 测试

2.1 RuyiSDK 测试

2.2 Eulaceura测试

  • 在Lichee Pi 4A 上成功刷写并运行Eulaceura,观察到1205对应的固件无法使Lichee Pi 4A的风扇正常工作:刷写启动

  • 针对Eulaceura使用的zypper的包管理,编写相关的mugen套件,以支持使用zypper进行包管理:commit

  • 使用 qemu 测试 eulaceura 图形化界面,firefox 浏览器能够正常运行 运行截图

2.3 独立测试任务

  • 荔枝派 4A / LPi4A 开启 WiFi 热点 / AP 文档 preview 版本镜像 firewalld 无法启动,经确认,最新 devel 版镜像已修复

3. 自动化测试工具开发

3.1 Ruyi Mugen 开发

  • 完成 ruyi-mugen 0.5.0 版本测试用例开发 pr !5

    主要功能更新 关联 commit
    新增用例 ruyi_test_gnu-plct-rv64ilp32-elf 394f954
    测试平头哥工具链交叉编译得到的二进制在 RevyOS 的运行 44760e5
    修复 mugen 框架在用例超时时无法正常杀死测试进程的问题 0c5f51e
    优化 mugen 框架用例超时的判断逻辑 df1c53c
  • RUYI 包管理 0.5.0 版本新增 CanMV-K230 镜像刷写,测试了镜像刷写功能的可用性并提交测试报告 pr !14

  • RUYI 包管理 0.5.0 mugen 自动化测试在 x86_64 QEMU Fedora 38、 x86_64 QEMU Ubuntu 22.04 LTS、 x86_64 QEMU openEuler 23.09、 riscv64 Container RevyOS 20231210、 riscv64 QEMU openEuler 23.09 环境运行,测试没有发现失败并提交测试报告 pr !16

  • 修复 ruyi_test_gnu-plct-rv64ilp32-elf 意外失败/未能正常创建源码文件的问题 commit

3.2 Ruyi openQA 开发

Feature

  • PR 编译为 python wheel 包,提供类似于 python selenium 的 API 可以以库的形式完全自由调用

    • 基本使用例

      from pyautotest import Driver
      driver = Driver(config=config) # 初始化驱动,开启测试
      try:
        res = driver.script_run_global("whoami", 5 * 1000) # 断言命令行输出
        logging.info(f"res: {res}")
      
        driver.sleep(1000 * 5) # 统一的 sleep
      
        res = driver.script_run_global("ls", 5 * 1000) # 断言命令行输出
        logging.info(f"res: {res}")
      
      except Exception as e:
        logging.info("e", e)
      
      driver.stop() # 停止测试
  • PR-WIP 实现 SSH 或 Serial 串口断开自动重连,保持日志不断开

3.3 Sail/ACT

  • Tech-golden-model Monday meeting(2024.2.5),会议纪要 Md

  • Arch Test ACT SIG meeting(2024.2.26) 会议纪要Md

  • 继续学习Sail相关知识,进行知识储备

4. 项目开发或包移植

4.1 RUYI 包管理 RPM 打包

  • RUYI 包管理基于 openEuler 23.09 的 RPM 包构建。由于 RUYI 的部分 python3 依赖包版本较高,需要重新打包 依赖包列表:

    包名 版本
    python3-semver 3.0.2
    python3-markdown-it-py 3.0.0
    python3-mdurl 0.1.2
    python3-rich 13.5.2
    python3-tqdm 4.66.1
    python3-types-pyxdg 0.28.0.20240106
    python3-frontmatter 1.1.0

    RUYI RPM 包:

    包名 版本
    python3-ruyi 0.4.0
  • 建立 ruyi-rpms 仓库托管 RPM 包于 Gitee GitHub

  • 对 python3-ruyi 运行 mugen 测试,其中 ruyi_test_common 、ruyi_test_xdg 出现失败,分析认为这是 RUYI 识别到了打包方式的不同而对相关操作做出不同的反应,而非缺陷; ruyi_test_device 出现失败,分析认为这是打包方式不同导致命令输出有不同,影响了测试用例的判断,亦非缺陷。完整日志

  • 给出一个 RUYI 包管理在 openEuler 23.09 独立发行版本的安装文档 ruyi-rpm.md

4.2 qtrvsim开发

  • 修复 Windows CI 输出内容无法使用的 Bug Commit

  • 调研崩溃问题 cvut/qtrvsim#95

  • PR-Draft: 尝试关闭 #58 GUI 优化, 点击菜单按钮由 show 转为 toggle, 等待作者 review

  • commit: issue 99 目前只编写 demo, 待进一步与作者沟通需求

5. 其他工作

东亚双周会—德语RISC-V社区进展调研

6. 职工

6.1 蔡玮霖

  • RUYI 包管理 RPM 打包

    • RUYI 包管理基于 openEuler 23.09 的 RPM 包构建。由于 RUYI 的部分 python3 依赖包版本较高,需要重新打包 依赖包列表:

      包名 版本
      python3-semver 3.0.2
      python3-markdown-it-py 3.0.0
      python3-mdurl 0.1.2
      python3-rich 13.5.2
      python3-tqdm 4.66.1
      python3-types-pyxdg 0.28.0.20240106
      python3-frontmatter 1.1.0

      RUYI RPM 包:

      包名 版本
      python3-ruyi 0.4.0
    • 建立 ruyi-rpms 仓库托管 RPM 包于 Gitee GitHub

    • 对 python3-ruyi 运行 mugen 测试,其中 ruyi_test_common 、ruyi_test_xdg 出现失败,分析认为这是 RUYI 识别到了打包方式的不同而对相关操作做出不同的反应,而非缺陷; ruyi_test_device 出现失败,分析认为这是打包方式不同导致命令输出有不同,影响了测试用例的判断,亦非缺陷。完整日志

    • 给出一个 RUYI 包管理在 openEuler 23.09 独立发行版本的安装文档 ruyi-rpm.md

  • RuyiSDK 测试

    • 完成 ruyi-mugen 0.5.0 版本测试用例开发 pr !5

      主要功能更新 关联 commit
      新增用例 ruyi_test_gnu-plct-rv64ilp32-elf 394f954
      测试平头哥工具链交叉编译得到的二进制在 RevyOS 的运行 44760e5
      修复 mugen 框架在用例超时时无法正常杀死测试进程的问题 0c5f51e
      优化 mugen 框架用例超时的判断逻辑 df1c53c
    • RUYI 包管理 0.5.0 版本新增 CanMV-K230 镜像刷写,测试了镜像刷写功能的可用性并提交测试报告 pr !14

    • RUYI 包管理 0.5.0 mugen 自动化测试在 x86_64 QEMU Fedora 38、 x86_64 QEMU Ubuntu 22.04 LTS、 x86_64 QEMU openEuler 23.09、 riscv64 Container RevyOS 20231210、 riscv64 QEMU openEuler 23.09 环境运行,测试没有发现失败并提交测试报告 pr !16

6.2 郑景坤

  • RuyiSDK

    • HiFive Unmatched / FU740调研

    • RuyiSDK 测试 v0.4.0

      • Milk-V Pioneer Box (v1.3) oERV 23.09 / ruyi 0.4.0 版本测试报告 PR
      • AllWinner D1 / Lichee RV & StarFive VisionFive 镜像刷写测试报告 PR
      • D1 (Lichee RV & AWOL Nezha) 镜像刷写测试 Gitee
      • StarFive VisionFive 镜像刷写测试 Gitee
      • ruyi rpm 打包版本 / openEuler RISC-V 测试 log
        • 环境:openEuler 23.09 preview rootfs on systemd-nspawn, QEMU 8.2.0

      v0.5.0

      • Milk-V Pioneer Box (v1.3) oERV 23.09 / ruyi 0.4.0 版本测试报告 Gitee
      • HiFive Unmatched 镜像刷写报告(openEuler + OpenWrt)Gitee
  • mugen 自动化测试

   修复 ruyi_test_gnu-plct-rv64ilp32-elf 意外失败/未能正常创建源码文件的问题 commit

  • 其他内容
    • 荔枝派 4A / LPi4A 开启 WiFi 热点 / AP 文档
      • preview 版本镜像 firewalld 无法启动,经确认,最新 devel 版镜像已修复

6.3 朱旭昌

  • RuyiSDK测试 v0.4.0

    • Lichee Pi 4A /RevyOS ruyi0.4.0版本测试文档 PR

    • Lichee Pi 4A /openEuler 2309 preview0.1 ruyi0.4.0版本测试文档 PR

    • Milk-V Pioneer Box (v1.3) /fedora / 0.4.0 版本测试文档 PR

    • VisionFive 2 /openEuler 2309 preview0.1 ruyi0.4.0版本测试文档 PR

    • VisionFive 2 镜像刷写测试文档 PR

    • Milk-V Duo 镜像刷写测试文档 PR

    v0.5.0

    • Lichee Pi 4A /RevyOS ruyi0.5.0版本测试文档 PR

    • Lichee Pi 4A /openEuler 2309 preview0.1 ruyi0.5.0版本测试文档 PR

    • Milk-V Pioneer Box (v1.3) /fedora / 0.5.0 版本测试文档 PR

  • RuyiSDK调研

    • 调研了Unmatched上 OpenWRT的支持情况,成功在Unmatched上启动了 OpenWRT,编写了对应的报告文档 OpenWrt 并提交了Commit
    • 调研了Unmatched上 ThreadX的支持情况,ThreadX为RTOS系统且在官方文档上未能找到unmatched相关支持文档,因此ThreadX 暂时的结果为在unmatched上不支持。
    • 调研了Unmatched在Ubuntu上的支持情况,成功在Unmatched上启动了Ubuntu,对应ubuntu官方文档Ubuntu
  • Sail/ACT

    • 2月5日参加了 tech-golden-model Monday meeting,编写了会议纪要 Md
    • 2月26日 Monday 26th Feb Arch Test ACT SIG meeting 会议纪要Md
    • 继续学习Sail相关知识,进行知识储备

SG2042 Upstream

Duo Upstream

RVI Collaborations

Jie Wu

参考链接