Renode ã使ã£ã ML 㨠Springbok ã®å調ã·ãã¥ã¬ã¼ã·ã§ã³
æ©æ¢°å¦ç¿ã®ã½ããã¦ã§ã¢ ã©ã¤ãã©ãªãã¢ãã«ã®ä¸çã¯æ¥éã«é²åãã¦ãã¾ã。é 延、é»å、ã»ãã¥ãªãã£ã¨ãã£ãæ¸æ¡ã«å¯¾å¦ãã¤ã¤、å¢å ãç¶ããã¡ã¢ãªã¨è¨ç®è½åã®éè¦ãæºããã«ã¯、å®è¡äºå®ã®ã¯ã¼ã¯ãã¼ãã¨åããã¦ç¹°ãè¿ã試è¡ããªãããã¼ãã¦ã§ã¢ãéçºããå¿ è¦ãããã¾ã。
RISC-V ISA ã¯、ãªã¼ãã³ãªã¢ã¼ããã¯ãã£ã«åºã¥ã、ã«ã¹ã¿ã å½ä»¤ããµãã¼ãã、æè»ãªãã¯ãã«æ¡å¼µæ©è½ãåãã¦ããã®ã§、ãã®ãããªå調è¨è¨ã«ã¾ãã¨ãªãæ©è½ãæä¾ãã¾ã。ã¾ã、RISC-V ã«ãããªã¼ãã³ ãã¼ãã¦ã§ã¢ ã¨ã³ã·ã¹ãã ã®æ´»æ§åã§、ç 究ãã¤ããã¼ã·ã§ã³ãæ¨é²ãã、ããã製é èªä½ãæ¹åããæ¹æ³ãçã¾ãã¦ãããã、ãã®ææ³ãæ´»ç¨ãã¦ã½ããã¦ã§ã¢ã®ãã¼ãºãä»ã¾ã§ä»¥ä¸ã«æºãããããã«ãªã£ã¦ãã¾ã。Google ã® OpenMPW Shuttle ãªã©ã®åãçµã¿ãã、ML ã«ç¹åããããã«å
å®ãããªã¼ãã³ãªã½ãªã¥ã¼ã·ã§ã³ãçã¿åºãããã«ã¯、ãªã¼ãã³ã§ã½ããã¦ã§ã¢çãªãã¼ãã¦ã§ã¢éçºã®ã¢ããã¼ããéµã¨ãªãã¾ã。 ãã®æ°ãæ、Google Research 㯠Antmicro ã¨é£æºãã¦、å¹ççãªãã¼ãã¦ã§ã¢ã¨ã½ããã¦ã§ã¢ã®ååè¨è¨ã®ã²ãªå½¢ã¨ãªãããã ããã¸ã§ã¯ããé²ãã¦ãã¾ãã。å®å
¨ãª ML ã½ãªã¥ã¼ã·ã§ã³ãéçºããããã«、Google Research ãã¼ã 㯠Antmicro ã®ãµãã¼ããåã、Antmicro ã®ãªã¼ãã³ã½ã¼ã¹ ã·ãã¥ã¬ã¼ã·ã§ã³ ãã¬ã¼ã ã¯ã¼ã¯ã§ãã Renode ã使ã£ã¦ãããéçºåã®é«é㪠ML éçºããã¼ãå®å
¨ãªãªã¼ãã³ã½ã¼ã¹ã§éçºãã¾ãã。 æ¨å¹´、Antmicro ã¯ãã®ååé¢ä¿ãæ´»ç¨ã、RISC-V ãã¯ãã«æ¡å¼µæ©è½ã® Renode ãµãã¼ããå®è£
ãã¾ãã。ãã®æ¡å¼µæ©è½ã¯、Springbok ã¨ããã³ã¼ããã¼ã ãæ㤠Google ãã¼ã ã® RISC-V ãã¼ã¹ã® ML ã¢ã¯ã»ã©ã¬ã¼ã¿ã«ä½¿ããã¦ãã、ä»åã®éçºã¯ãã®çµæããã¼ã¹ã«è¡ããã¦ãã¾ã。ããã¸ã§ã¯ãã®ä¸ç°ã¨ãã¦、ãããããã¼ä½é¨ãããã«åä¸ããããã、Antmicro ã¯åå°ã¨ãªã SoC ã®ãµãã¼ãã®æ¹åããã¾ãã。ããã«、OS ã«å¯¾å¿ãããããã°、ããã©ã¼ãã³ã¹ã®æé©å、ãã¤ãã¼ãã®ãããã¡ã¤ãªã³ã°、ããã©ã¼ãã³ã¹æ¸¬å®æ©è½ãªã©、ããããã®ã¦ã¼ã¶ã¼æåæ©è½ã«ãåãçµãã§ãã¾ã。 Springbok ã¯、Google ã® AmbiML ããã¸ã§ã¯ãã®ä¸é¨ã§ã。ãã®ããã¸ã§ã¯ãã¯、ãã©ã¤ãã·ã¼ã¨ã»ãã¥ãªãã£ãä¸å¿ã¨ãããªã¼ãã³ã½ã¼ã¹ ML éçºã¨ã³ã·ã¹ãã ã®ä½æãç®çã¨ãã¦ãã¾ã。Google Research ãã¼ã ã¯、RISC-V ãã¯ãã«æ¡å¼µæ©è½ãæ´»ç¨ãã¦、æ¨æºçã§ãããªããæè»ãªæ¹æ³ã§ ML ãã¤ãã¼ãã«æ¬ ãããªãè¡åã®ç©åæ¼ç®ã並ååãã¾ãã。ããã«、Renode ã®ãããã§、æ
å ±ã«åºã¥ããé¸æã«ãã£ã¦ RISC-V ã®æè»æ§ãæ´»ç¨ããå³å¯ãªæ¹æ³ã決ãããã¨ãã§ãã¾ã。ããã¯、Renode ãçæãããã¼ã¿ã¨、ãã¼ãã¦ã§ã¢ã®æ§æãæ©è½ãæ°æ¥ã§ã¯ãªãæ°åã§è©¦ããã¨ãã§ããããã¹ããã¼ã¹ã®è¨å®æ©è½ã使ã、ç¾å®çãªå復å¦çã§ã¹ãã¼ã、è¤éã、ç¹æ®æ§ã®ãã¬ã¼ããªããåæãããã¨ã«ãã£ã¦ã§ãã¾ã。 ML ã½ããã¦ã§ã¢å´ã®ã¨ã³ã·ã¹ãã ã®ä¸å¿ã«ããã®ã¯、IREE ã§ã。ããã¯、LLVM MLIR ããã¼ã¹ã«、ML ã³ã³ãã¤ã©ã¨å¶ç´ã®å¼·ãããã¤ã¹åãã®ã©ã³ã¿ã¤ã ããªã¼ãã³ã½ã¼ã¹ã§éçºãã Google ã®ãªãµã¼ã ããã¸ã§ã¯ãã§ã。 IREE ã使ãã¨、TensorFlow ã TensorFlow Lite ãªã©ã®ä¸è¬ç㪠ML ãã¬ã¼ã ã¯ã¼ã¯ããã¢ãã«ãèªã¿è¾¼ã¿、ä¸é表ç¾(MLIR)ã«å¤æã§ãã¾ã。ãã®å¾、ãããã°ã©ãã¬ãã«ã§æé©åã、LLVM ã³ã³ãã¤ã« ããã¼ã«ãã£ã¦ç¹å®ã®ã¿ã¼ã²ããã«æé©ãªã©ã³ã¿ã¤ã ã«ã³ã³ãã¤ã«ãã¾ã。IREE ã§ã¯、対象ããã¤ã¹ã«ã¢ãã«ããããã¤ãã API ã C 㨠Python ããã°ã©ãã³ã°è¨èªã®ä¸¡æ¹ã§æä¾ããã¦ãã¾ã。ã¾ã、ã¢ãã«ã®èªã¿è¾¼ã¿、ãã³ã½ã«ç®¡ç、æ¨è«ã®èµ·åãè¡ãããã、TFLite ã¨åãå¤æãæä¾ãã TFLite C API ãç¨æããã¦ãã¾ã。 ãããã£ãã©ã³ã¿ã¤ã ã使ãã¨、対象ããã¤ã¹ã Renode ãªã©ã®ã·ãã¥ã¬ã¼ã·ã§ã³ç°å¢ã§、ã¢ãã«ã®ãããã¤ããã¹ã、ãããã°、ãã³ããã¼ã¯、å®è¡ãå¯è½ã«ãªãã¾ã。 ããªã§éå¬ããã Spring 2022 RISC-V Week ã¯、ããæ°å¹´ã§åãã¦ã¨ãªããªã¼ãã³ ãã¼ãã¦ã§ã¢ã®å¤§è¦æ¨¡ã«ã³ãã¡ã¬ã³ã¹ã§ãã。ããã«åãã¦、æåã®ãã¼ã¸ã§ã³ã® AmbiML ãã¢ã¡ã¿ã« ML ããã¼ããªã¼ãã³ã½ã¼ã¹ã¨ãã¦ãªãªã¼ã¹ããã¾ãã。ããã«ã¯、ã¤ã³ã¿ã©ã¯ãã£ãã«å®è¡ããæ©è½ã¨ãµã³ãã« CI ã®ä¸¡æ¹ãå«ã¾ãã¦ãã¾ã。ãµã³ãã« CI 㯠Antmicro ã® GitHub Renode Action ã使ã£ã¦ãã、ãããã£ãã¯ã¼ã¯ããã¼ãã³ããããã¨ã«èªåãã¹ãã§ãããã¨ã示ãã¦ãã¾ã。ç¾å¨、Google Cloud ãã¼ããã¼ã§ãã Antmicro ã¯、Google Cloud ã¨é£æºãã¦、ãã®ãããªã·ããªãªã§ã®å¤§è¦æ¨¡ãª CI ã®ãã¹ãããããã¤ã« Renode ãå©ç¨ã§ããããã«ããä½æ¥ãè¡ã£ã¦ãã¾ã。 ããªã®ã¤ãã³ãã§ã¯、Antmicro 㨠Google ã¯ã½ããã¦ã§ã¢å調éçºããã¼ãçºè¡¨ã、1 ã¤ã®ã³ã¢ã§ AmbiML Springbok ãã¤ãã¼ããå®è¡ã、å¥ã®ã³ã¢ã§ Zephyr ãå®è¡ããã¨ããæ··å¨ãã«ãã³ã¢ ã½ãªã¥ã¼ã·ã§ã³ã®ãã¢ããã¾ãã。 çºè¡¨ããã·ããªãªã§ã¯、Springbok ã³ã¢ãã¡ã¤ã³ CPU ãã ML è¨ç®ããªããã¼ãããè£
ç½®ã¨ãªã£ã¦ MobileNetv1 ãããã¯ã¼ã¯ã®æ¨è«ãã、RISC-V ã«ã¹ã¿ã å½ä»¤ãéãã¦ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã¢ã«ä½æ¥çµæãå ±åãã¾ãã。Renode ã§ã¯、ã«ã¹ã¿ã å½ä»¤ã®è¿½å ãå¤æ´ã¯ç°¡åã«è¡ãã¾ã。Python ã C# ã使ã£ã¦ 1 è¡ã§è¨è¿°ãããã¨ã、RTL ã§å調ã·ãã¥ã¬ã¼ã·ã§ã³ãã§ãã¾ã。 ML ãããããã¼ããããè¨è¨è
ã¯、Renode ãã½ãªã¥ã¼ã·ã§ã³ã®ãã¹ããå®è¡ã«æ´»ç¨ã§ãã¾ã。ããã ãã§ãªã、ã½ããã¦ã§ã¢ãå®éã«ä½ãè¡ã£ã¦ãããã詳ããç¥ãããã«å©ç¨ãããã¨ãã§ãã¾ã。Antmicro 㨠Google ã¯、ããªã®ãã¢ã®ä¸ç°ã¨ãã¦、å®è¡ããå½ä»¤æ°ãç¹å®ã®ãªãã³ã¼ãã®ä½¿ç¨é »åº¦ãæ°ããæ¹æ³ãç´¹ä»ãã¾ãã。ãããã£ãæ©è½ã¯、ã½ãªã¥ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹ãè©ä¾¡ããããã«æ´»ç¨ã§ã、å®è¡ææ¨åæãå®è¡é¢æ°ãã®ã³ã°、ããã¦æè¿éçºãããå®è¡ãã¬ã¼ã¹çæã¨åãããã°、ML ã¨ãã¥ã¬ã¼ã·ã§ã³ç°å¢ã®è©³ããæåãææ¡ã§ãã¾ã。 ãã®ãããªæ©è½ã、Renode ã®ãã¾ãã¾ãªãã¼ãã¦ã§ã¢ãã½ããã¦ã§ã¢ã®å調éçºã½ãªã¥ã¼ã·ã§ã³ã«å ããã¾ã。ãã®ãããªã½ãªã¥ã¼ã·ã§ã³ã®ä¾ã¨ãã¦、Antmicro 㨠Microchip ãå
±åéçºãã¦ãã RTL å調ã·ãã¥ã¬ã¼ã·ã§ã³ã、Verilator 対å¿ã®ã«ã¹ã¿ã å½ä»¤ã®ãµãã¼ããªã©ãæãããã¾ã。å¾è
ã¯、RISC-V Custom Function Units ãæ
å½ãã¦ããå¥ã® ML ã«ç¹åãã Google ã®ãã¼ã ã¨ã®å
±åéçºã«ãããã®ã§、EU ãè³éæä¾ãã VEDLIoT ããã¸ã§ã¯ãã§ã使ããã¦ãã¾ã。 ãã®åãçµã¿ã¯、ã½ããã¦ã§ã¢ããã¼ãã¦ã§ã¢ã®ã³ã³ãã¼ãã³ãã、å®å
¨ãª ML éçºã®ããã®å調è¨è¨ã¨ã³ã·ã¹ãã ããµãã¼ããããã¼ã«ããªãªã¼ã¹ããããã«、Antmicro ãé²ãã¦ãã Google Research ãã¼ã ã¨ã®å¹
åºãæ´»åã®å§ã¾ãã§ããããã¾ãã。Renode ã RISC-V、å調éçºãä»å¾ã® ML ä¸å¿ã®ãããã¯ãéçºã«å½¹ç«ã¦ãããã¨æã£ãæ¹ã¯、ãã²ãèªå㧠AmbiML ããã¼ã試ãã¦ã¿ã¦ãã ãã。 GitHub ã® iree-rv32-springbok ãªãã¸ããªã«ã¢ã¯ã»ã¹ã、ãã¼ã«ã«ã«ã¯ãã¼ã³ãã¦、README.md ã®æé ã«å¾ã£ã¦ãã ãã。 Renode ã¯å
¬å¼ãªãã¸ããªãããåå¾ã§ãã¾ã。ããã«å®è¡ã§ãããã¢ã試ããã¨ã、Renode ã®ããã¥ã¡ã³ãã確èªã㦠Verilator å調ã·ãã¥ã¬ã¼ã·ã§ã³ãªã©ã® ML ã¢ã¯ã»ã©ã¬ã¼ã·ã§ã³éçºã«å½¹ç«ã¤æ©è½ã«ã¤ãã¦å¦ã¶ãã¨ãã§ãã¾ã。HW/SW å調è¨è¨ããã¼ã«ãã RISC-V ãã¼ã¹ã® ML ã¢ã¯ã»ã©ã¬ã¼ã¿
Spring 2022 RISC-V Week ã§ã®ããã¼ã®ãã¢
ä»å¾ã®è¨ç»
Posted by Johan Euphrosine and Takuo Suzuki - Developer Relations Team