ãããªãã¿ã¤ãã«ã¨é¢ä¿ãªããããªè©±é¡ããã¹ã¿ã¼ããã¾ãããä»é±1çªã®ãããã¯ã¯ããªãã¨è¨ã£ã¦ãEdge TPUがオフィシャルに発売ããããã¨ã§ãããã
ãããUSBæ¥ç¶ã®ã¢ã¯ã»ã©ã¬ã¼ã¿ããã£ã80ãã«å¼±ã§ãããæ¥æ¬ã ã¨Mouserで8800円ほどã
ããã¤ããã¡æ©ãå ¥æã§ããIdein社å ã§ã®ã試ãçµæããã¡ãã
Edge TPU(USBç)
— Koichi Nakamura (@9_ties) 2019å¹´3æ5æ¥
Mobilenet v2 1.0 224x224 ImageNet
Raspberry Pi 3 Model B v1.2
ã§10msã¡ãã£ã¨ã§ãã pic.twitter.com/BOfSAgUewJ
10msã£ã¦ãã¨ã¯ãã¨6msç¨åº¦å¥ã®å¦çã«å
ã¦ã¦ãé«ç²¾åº¦ã«ã¡ã©ã®ãã¬ã¼ã ã¬ã¼ã60fpsã«éã«åã£ã¡ããã£ã¦ãã¨ã§ãããã¯ããã£éãã
åã¯å»å¹´å¤ã«Edge TPUãã¢ãã¦ã³ã¹ãããã¨ãããããããä¸ã«åºåã£ãæç¹ã§AIãããæ¦äºã¯çµçµããããªã£ã¦æã£ã¦ããã§ãããæ¬å½ã«ãããªããããå¤ãªæ¬ é¥ã§ãè¦ã¤ãããªãéããã¤ãã¤ã
ã§ãæ¨æ¥ãããæ´ã«ã³ã£ããããã®ã¯ããã®Edge TPUãChiselã¨ããè¨èªã§è¨è¨ããããã¨ããã®ãç¥ã£ã¦ããã§ããã
以ä¸ããã®è©±ããã¦ããåç»ï¼è±èªï¼ã
Chiselã«ã¤ãã¦ã¯ä»ã¾ã§
- RISC-Vçéã§æµè¡ã£ã¦ããããã
- ディープラーニングコンパイラTVMå°ç¨ã®ISAã§ããVTAãChiselã§å®è£ ããããã¸ã§ã¯ããå§ã¾ã£ãããã
ããããèãããã£ãç¨åº¦ã§ãè¨èªã®ä¸èº«ãããç¥ããèå³ããããªã«æ¹§ãã¦ããªãã£ããã§ãã
ããå®è£½åã«é©ç¨ããã¦ãããåºæ¥ãããããã ãã¨ãªãã¨ããã¯ãä¿ç¶èå³ã湧ãã¦ãã¾ãã
ã¨ãããã¨ã§ã調ã¹ã¦ã¿ã¾ããã
â¦â¦ã¨è¨ã£ã¦ãä¸æ©ã§ãããªã«æ²¢å±±èª¿ã¹ãããã¯ãããªããã²ã¨ã¾ã
ãããããã£ããèªã¿ã¾ããã以ä¸èªåãªãã®Chiselã®ç¹å¾´ã¾ã¨ãã
ãã¼ãã¦ã§ã¢æ§ç¯è¨èªã§ãã
Chisel ã¯èªèº«ããã¼ãã¦ã§ã¢æ§ç¯è¨èªï¼Hardware Construction Languageï¼ã¨åä¹ã£ã¦ãã¾ãããããããããèãæ
£ããªãç¨èªã
ããç¥ããã¦ããã®ã¯VHDLãVerilog HDLãªã©ã®ãã¼ãã¦ã§ã¢è¨è¿°è¨èªï¼Hardware Description Language, HDLï¼ã§ãã¡ãã£ã¨è©³ãã人ãªãSystemCï¼ãæ¢ã«æ¶ãå»ã£ãSpecCï¼ãªããã®ä¿ã«è¨ãé«ä½è¨è¨è¨èªãããããªã¨æãããã§ããããããã¨ä½ãéãã®ãã
èªåã®ããã£ã¨ããç解ã誤解ãæãã端çã«è¨ãã¨ãRTLãã®ãã®ã®æ½è±¡åº¦ãä¸ããè¨èªãªã®ããªãã¨ããæãã§ãã
RTLï¼Register-Transfer Levelï¼ã¨ã¯ãã¤ã¾ãã¬ã¸ã¹ã¿ãæ¼ç®å¨ã¢ã¸ã¥ã¼ã«ã¨ãã®éã®æ¥ç¶ã®ãã¼ã¿ããã¼ãè¨è¿°ããã¬ãã«ã§ããããã¾ã§ã®HDLã¯ãã®æ½è±¡åº¦ã§æ¸ãããæ³å®ããã¦ãã¾ããã
ã§ãããã§ã¯æ½è±¡åº¦ãä½ãçç£æ§ãä½ããããSystemCãªã©ã¯ããã¤ãã¢ã¬ãã«ãã¤ã¾ãåè·¯ã®æ¯ãèããã½ããã¦ã§ã¢ã©ã¤ã¯ãªæ½è±¡åº¦ã§æ¸ããããã«ãªã£ã¦ãã¾ãã
ãã ãHDLã«ããSystemCã«ãããRTLããã£ã¦ããã®ä¸ã«ããã¤ãã¢ã¬ãã«ããããã¨ãã観念ã«åã£ã¦ãã¾ãããããã¯é·ãããã¼ãã¦ã§ã¢æ¥çã®å¸¸èã ã£ãããã§ãã
ããããChiselã¯ãã®å¸¸èã«åã£ã¦ããããRTLãæ¸ããã©RTLãã®ãã®ã®æ½è±¡åº¦ãä¸ãã£ã¦ããã¨ããããªã«è¦ãã¾ãã
Scalaã®çµè¾¼ã¿DSLã§ãã
ã§ããã®æ½è±¡åº¦ãä¸ããè¦å ã¨ãªã£ã¦ããã®ãããã®ChiselãScalaã®çµè¾¼ã¿DSLã¨ãã¦å®ç¾ããã¦ããç¹ã
Scalaã¨ã¯2000年代ã«ç»å ´ããè¨èªã§ããã®ãã£ãããã£ãããã説æããããªãJavaãé¢æ°åè¨èªã®ãã¬ã¼ãã¼ã§æ¸ããããã«ããããã°ã©ãã³ã°è¨èªãã¨ããããªã®ãã®ã§ãã
ã§ãChiselã¯ããã¤ã®çµè¾¼ã¿DSLãã¤ã¾ãScalaå
ã«åãè¾¼ã¾ãããã¼ãã¦ã§ã¢è¨è¨ç¹åè¨èªãªããã§ãã
è¨èªãçµè¾¼ã¿DSLã¨ãã¦è¨è¨ããæå³ã¯è¨èªã«ãã£ã¦æ§ã
ã§ãããChiselã®å ´åã¯Scalaã¨ããã¢ãã³ãªããã°ã©ãã³ã°è¨èªã®æ©è½ããã«æ´»ç¨ãã¦ãã¼ãã¦ã§ã¢ãæ¸ããã¨ããã®ãçãã§ããããã«è¦ãã¾ãã
èãã¦ã¿ãã«ãVHDLã¯Adaã¨ããå¤ãããã°ã©ãã³ã°è¨èªãå
ã«ãªã£ã¦ãããVerilogã¯ããã«CãPascalã®ãã¬ã¼ãã¼ããã¶ãããã®ãè¦ããã«ãã¼ã¹ã¨ãªã£ã¦ããè¨èªãå¤ãããã§ãã
ã§ããã¼ãã¦ã§ã¢ããããããã¼ã¹ã®å¤ãè¨èªã§ãã£ã¨ãã£ã¦ããåãã§ãã½ããã¦ã§ã¢ã®è¨èªã¯æ½è±¡åº¦ãä¸ãããåã·ã¹ãã ãªãããããªãæ´åããã¦ãå°ãªãè¨è¿°éã§é«åº¦ãªè¨è¿°ãã§ããããã«ãªã£ã¦ãã¾ããã
ãªã®ã§ããã¼ã¹ã®è¨èªãã¢ãã³ãªãã®ã«ç½®ãæããã°ããã ãã§çç£æ§ã¯éåä¸ãããã¨ãããã¨ã¯ç¢ºãã«è¨ããããããã¡ããå£ã§ããã»ã©ç°¡åãªãã¨ã§ã¯ãªããã§ããã
Chiselã®æ©è½
ä¸ã§ãè¿°ã¹ãããã«ãChiselã§è¨è¿°ãããã®ã®å¤§æ ã¯ãã¸ã¿ã«åè·¯ã®RTLã§ãã
ããããä¸ã«è¨è¿°ãããã¢ã¸ã¥ã¼ã«ã ï¼ãªãã¸ã§ã¯ãæåçãªï¼ãªãã¸ã§ã¯ãã§ãããé¢æ°ã§ãããã¾ãããªã®ã§ã½ããã¦ã§ã¢çã«é«ãæ½è±¡åº¦ã§ã¢ã¸ã¥ã¼ã«ãæ¸ãä¸ããã£ã½ãã
ãªãã¸ã§ã¯ãæåçãªãªãã¸ã§ã¯ããªã®ã§ç¶æ¿ã使ããããããã«ã¸ã§ããªã¯ã¹ã使ãã¾ããä¸é¨ã«ã¯ãã¬ã¤ãã使ããã¦ãã¾ããããããæè¿ã®è¨èªã«åãã£ã¦ããå¤ç¸æ§ããã¼ãã¦ã§ã¢ã®è¨è¿°ã«ä½¿ãã¾ãã
ãã¨éæã«åæ¨è«ã使ããã®ã§ç
©éãªè¨è¿°ãããªãã®é¨åçç¥ã§ãã¾ãã
ä»æã®ããã°ã©ãã³ã°è¨èªãç¥ã£ã¦ã人ã«ã¯éåæ¸ããããè¨èªã ãããªã¨æãã¾ããåºæ¬ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã®ä¼ç¤¾ã§ããGoogleã§æ¡ç¨ãããã®ããã¹ãªãããªãã¨ããæ°ããã¾ãã
Chiselã®çæ
ãªãã»ã©è¯ãããã ãªãã¨ããChiselã®å人çå°è±¡ãªãã§ãããä¸æ¹ã§ä¸ã§ç´¹ä»ããåç»ã§ã¯Chiselã®çæãè¿°ã¹ããã¦ãã¾ããã
ããã¤ããã£ããã©å人çã«å°è±¡ã«æ®ã£ãã®ã¯ä»¥ä¸ã®2ã¤ã
å¦ç¿ã³ã¹ããé«ã
åç»ã§ã¯ãChiselã®å¦ç¿ã¯
- Chiselã§ã®RTLã®æ¸ãæ¹ãè¦ãããã§ã¼ãº
- Scalaã«ç¿çãããã§ã¼ãº
- Chiselããã¼ã«ã¨ãã¦ä½¿ãããªããã§ã¼ãº
ã®3段éãããã¨è¨ã£ã¦ãã¦ããããã»ã¨ãã©ã®ãã¼ãã¦ã§ã¢ã¨ã³ã¸ãã¢ã¯1ã®æ®µéãè¶ ããããªãã¨ãã話ã確ãã«ãããããããªãã
æ¤è¨¼ãã¯ã½ã ãºã
ãããã Googleã®æ¤è¨¼ã¨ã³ã¸ãã¢ãã ãã¶æ»ãã§ãããã§ãã
ããã¯ã¾ã Chiselãæªæçãªãããªã®ããªãã¨ããæ°ããããã§ããã©ãChiselãåãåºãSystemVerilogè¨è¿°ãChiselã®ã½ã¼ã¹ã¨ãã¾ã対å¿ä»ãããããä½ã¬ãã«ã®RTLè¨è¿°ãæ¤è¨¼ã¨é常ã«ç¸æ§ãæªãããªã©ããããè¨è¨ã®æ¤è¨¼ãããã«ã¯ã¾ã ã¾ã ç©è¶³ããªãã¨ãããå¤ãããã§ãã
[追è¨] ãã®è¨äºèªãã§ãæ¤è¨¼ã§ããªãããã使ãç©ã«ãªãããã¿ãããªåå¿ããã¦ãã人ãã¡ããã¡ããããã®ã§è£è¶³ãã¦ããã¾ãã¨ãEdge TPUãã¼ã ã®åç»ã§ã¯Chiselã®é·æã¨ãã¦ãã½ããã¦ã§ã¢çãªåä½ãã¹ããé常ã«æå¹ã ã£ããã¨ãã話ãè¿°ã¹ã¦ãã¾ããç¬ç«ããæ¤è¨¼ã¨ã³ã¸ãã¢ã®æã«ãããããå ¨ä½ã¸ã®æ¤è¨¼ãé£ãã代ããã«ããããã½ããã¦ã§ã¢çãªãã¹ãææ³ã§æ¤è¨¼ãè£ã£ã¦ããï¼è£ããï¼ã¨ãããã¨ãªã®ããããã¾ããã[追è¨çµãã]
çµè«
ã¾ãããããçæã¯ããã¤ã¤ããå°æ°ç²¾éã®ãã¼ã ãçç£æ§ãä¸ããããªãChiselã¯ããè¨èªã ãããªã¨ããå°è±¡ããã¡ãã¨ä½¿ãããªãã人ã使ãã°Verilogãªããã§æ¸ããããå ¨ç¶æ¥½ãã³ãããããªãã§ããã