10月23日工作记录

明天可能需要开同步会议,今天先总结一下近日工作。另外的考量是确实有点摸不着头脑自己在干啥了。一种没有清晰把握脉络的焦虑感促使我写这篇记录。 按照时间顺序 首先肯定是发现了 riscv-vector-fuzzing-test 这个项目里面在使用 /include/CustomOperator.def 当所有需要处理的指令合集。 问题在于出现了生成的intrinsic function参数个数不对,进行同步发现 rvv 1.0 spec可能需要使用 sifive-intrinsic-doc 这个项目中生成的 rif.def 文件。 直接把 rif.def 修改为 CustomOperator.def 使用会出现以下问题: SizePtr, NeedMerge, Void 这些属性无法识别。 暂时用移除 vleff, vslideup, vsm 等指令来解决。 riscv-vector-fuzzing-test 中 script/GenerateOperatorComputeHeaders.py 无法识别 op id。 暂时移除 vcreate, veget, vlm, vlmul_trunc, vlmul_ext, vreinterpret, vsetvlmax, vsetvl, vundefined, vlse 等指令来解决。 生成的 \include\autogen\compute{op_type}.h 中 include 的 spike 或者本地头文件名不对。 在 script/* 中加入判断 op_id 进行了修复。比如 vfmv_v_f, vfmv_f_s。 尚未找出 CustomOperator.def 中为何会如此生成。比如compress_vv, spec 中是 compress_vm。 暂时移除 compress_vv 解决。 当以上 CustomOperator.def 的问题大部分用跳过的方式解决之后,出现了 mask 指令在 \include\autogen\compute{op_type}.h 声明的变量数量不一致的问题。 解决方式是在 script\*Literal.py 中的 create_*_op 函数,加入判断,如果是 mask function 之后加入一个 input 作为 mask function 默认的 vd 值。并修改了 *_literal_mask_body 中的参数。 随后出现了有 rounding mode 的指令参数不正确的问题。 解决方式是在 script\*Literal.py 加入如果 input_type 中有 “SclarUIntXLen” 就使用新增的包含 rounding mode 的 _frm_body。 但是使用 “SclarUIntXLen” 是根据观察决定的,导致了包含该 input type 但没有 rounding mode 的 shift 指令生成错误。所以判断条件变为 elif "ScalarUIntXLen" in input_types and op_id not in ['nsra_wx','nsrl_wx','sll_vx','sra_vx','srl_vx']。 可能有待改进。 以上问题解决完毕之后,出现了 /test/test*.cpp 的参数没有定义的问题,根据该参数为 op_type 将所有文件按照 CustomOperator.def 修改完毕解决了没有定义问题,但是 testPolicy.cpp 中带有 TA, TU, TAMA, TAMU, TUMA, TUMU 后缀的参数确实不知道在哪里找。 可以确定是只是 rvv 1.0 中对 tail policy 的内容进行了修改,这部分肯定是需要修的。 接下来有靠谱的方法,理解 test\test.cpp 从何而来,为何要写并改写。 不靠谱的方法,删掉 testPolicy.cpp。因为生成脚本中很多有ta相关内容我也并未修复。 先去修了,小结就到这里。

October 23, 2024 · xyenchi

10月16日工作记录

今日发现rif mask 的指令生成的 test case 会根据 riscv-v-spec 推荐的给 vd 置1,但是我之前写的是生成随机的默认 vd。看 spec 我这样也可行。但是在吃饭的路上突然想起来这件事,还是两年前在众创楼111看的,一晃都搬了两个办公室了,就觉得人的记忆很神奇。 这是否也是一种学习路径问题,在完全没有某些事物的概念的时候记忆和理解都非常困难。就像自行车和游泳都要从小学习。 扯远了。。。 今天只修了一个decode的变量摆放位置不对的问题,报错是数据类型不对,还有其他很多位置摆放不对,没来得及修。实际上有一种不知道这样修会不会有什么别的问题产生的焦虑感,不忍心下手。

October 16, 2024 · xyenchi

8-9月面基、出行的记录

7.28出发前往上海与旧友周予西、杨倩、宋昇见面,并与csl进行了首次面基。周予西没有对我的寸头作出任何反应,甚至有一种根本没发现的淡定。杨倩说我很有少年感非常帅气,并录了视频。宋昇说我俩交换了发型,确实,他长发。 我问周予西,为什么没有说我的发型,她说对我做出什么事情都不会感到意外的,毕竟高中是做出了给座位表添格子的人。然而我对此印象不深,经提醒想起来是某次选座位想坐最后一排,被老师修改了选座结果,于是自己给座位表画了一行搬到了后面去。 上大学之后其实一直没有什么见面机会,大家都有了各自的学习、生活,大学毕业之后更甚,好像已经是两个不同世界的人了。见面之后聊了很久,没有别人的八卦,都是一些近况和未来,我感到很舒适。 与杨倩见面的时间非常短暂,只吃了个饭,她还是和大学一样可爱,我非常喜欢贴。和宋昇也聊了很多关于工作的事情,好像从事了不同的行业,我太菜了,对计算机的其他技术也不是很了解,于是进行了了解。csl带我参观了微软紫星路的园区,并进入食堂就餐。 7.30-8.9进行了日本旅行,8.1参加了 RISCV Tokyo Day,具体哪几天干了啥写起来好多,我决定咕了。 8.22-8.24前往杭州参见 RISC-V 中国峰会,与众多网友面基,参观 RISC-V 最新最热展台。8.25观看了西湖边上的大型中西结合实景秀节目。 就餐途中聊起了大家是否参加今年于捷克布拉格举办的 gnu cauldron,我说vfs网站总是碰到问题,无法预约,结果杭州同事当场给我表演了打开成功,我约上了8.29的办理签证。来回仅花了1周即办理完毕。 9.13-9.18进行了武汉-北京-捷克布拉格-阿姆斯特丹-厦门-武汉的跳跃。捷克人民好热情,如果有什么问题都会耐心讲解很多,步骤非常详细,让我感到震惊的是,他们貌似每个人对每一条公交线路都了如指掌。 参加gnu cauldron的内容有待详细展开,但可能不能放在nonsense目录中。我常常在想是否自己太菜不应该去参加这些活动,而是自觉闷头在家狂学。但是观察了几日自己在家,不太能狂学,于是心态放平了,有机会就应多出去走走,事情只需要契机办理。

October 15, 2024 · xyenchi

再次重启每日废话

天气晴 下午看到了天上的云有奇妙纹理,像脑花,掏出手机拍了一张,发现手机摄像头的马赛克效果比脑花纹理还清晰。 最近把主机转了个方向发现主板在 gprofng 编译的时候会亮过热的红灯,在cyy的建议下把 intel i7 12700 CPU 原装风扇换成了超大风扇,RISC-V qemu system 的性能好多了。既没有了终端显示乱刷问题,编译时间也快了很多。 本来之前 gprofng 没啥头绪的,现在貌似觉得还可以研究一下,因为可以根据报错来找到哪里有问题了。

June 13, 2024 · xyenchi

only-riscv 分支的记录

目前成功构建的 patch :RISC-V: Fix VL operand bug in VSETVL PASS[PR110264] 此patchRISC-V: Bugfix for RVV integer reduction in ZVE32/64.构建失败,但是RISC-V: Fix one typo for reduc expand GET_MODE_CLASS可以修复。 中间夹杂了 RISC-V:Add float16 tuple type support ,此构建失败报: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genemit.cc:25: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genextract.cc:22: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genemit.cc:22: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genpeep.cc:25: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/rtl.cc:31: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/rtl.cc:28: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genpeep.cc:22: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genautomata.cc:111: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genautomata.cc:108: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc/gcc -I../.././gcc/gcc/build -I../.././gcc/gcc/../include -I../.././gcc/gcc/../libcpp/include \ -o build/gensupport.o ../.././gcc/gcc/gensupport.cc In file included from ../.././gcc/gcc/genpreds.cc:27: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genoutput.cc:90: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genpreds.cc:24: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genopinit.cc:25: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/genoutput.cc:87: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genopinit.cc:22: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genrecog.cc:112: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ make[2]: *** [Makefile:2825: build/genextract.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from ../.././gcc/gcc/genrecog.cc:109: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/genattrtab.cc:109: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ make[2]: *** [Makefile:2825: build/genpeep.o] Error 1 make[2]: *** [Makefile:2825: build/genemit.o] Error 1 In file included from ../.././gcc/gcc/genattrtab.cc:106: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ In file included from ../.././gcc/gcc/read-rtl.cc:34: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/read-rtl.cc:31: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ make[2]: *** [Makefile:2825: build/rtl.o] Error 1 make[2]: *** [Makefile:2825: build/genopinit.o] Error 1 make[2]: *** [Makefile:2825: build/genoutput.o] Error 1 make[2]: *** [Makefile:2825: build/genpreds.o] Error 1 make[2]: *** [Makefile:2825: build/read-rtl.o] Error 1 make[2]: *** [Makefile:2825: build/genrecog.o] Error 1 make[2]: *** [Makefile:2825: build/genattrtab.o] Error 1 make[2]: *** [Makefile:2825: build/genautomata.o] Error 1 In file included from ../.././gcc/gcc/gensupport.cc:24: ../.././gcc/gcc/rtl.h:316:31: warning: ‘rtx_def::mode’ is too small to hold all values of ‘enum machine_mode’ 316 | ENUM_BITFIELD(machine_mode) mode : 8; | ^~~~ In file included from ../.././gcc/gcc/gensupport.cc:21: ../.././gcc/gcc/rtl.h: In member function ‘long unsigned int subreg_shape::unique_id() const’: ../.././gcc/gcc/rtl.h:2160:37: error: static assertion failed: MAX_MACHINE_MODE <= 256 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ ../.././gcc/gcc/rtl.h:2160:37: note: the comparison reduces to ‘(284 <= 256)’ 2160 | { STATIC_ASSERT (MAX_MACHINE_MODE <= 256); } ../.././gcc/gcc/system.h:850:19: note: in definition of macro ‘STATIC_ASSERT’ 850 | static_assert ((X), #X) | ^ make[2]: *** [Makefile:2825: build/gensupport.o] Error 1 可能是这俩的问题吧: Bump up precision size to 16 bits. Machine_Mode: Extend machine_mode from 8 to 16 bits ...

April 22, 2024 · xyenchi