{"id":10476,"date":"2019-03-26T03:05:10","date_gmt":"2019-03-26T03:05:10","guid":{"rendered":"https:\/\/www.techdesignforums.com\/practice\/?p=10476"},"modified":"2019-04-02T07:42:39","modified_gmt":"2019-04-02T07:42:39","slug":"computer-vision-high-level-synthesis-for-ai-part-one","status":"publish","type":"post","link":"https:\/\/www.techdesignforums.com\/practice\/technique\/computer-vision-high-level-synthesis-for-ai-part-one\/","title":{"rendered":"High-level synthesis for AI: Part One"},"content":{"rendered":"<p>Computer vision is a very dynamic part of the artificial intelligence (AI) market. It is attracting massive amounts of funding largely because it targets a very wide range of applications (Figure1).<\/p>\n<p>This two-part series will look at the role high level synthesis (HLS) technology plays in the development of computer vision systems. Part One describes key design challenges and how HLS addresses them. Part Two focuses on flow implementation and provides results from a recent case study.<\/p>\n<div id=\"attachment_10477\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.techdesignforums.com\/practicefiles\/2019\/03\/HardwareAndSoftwareMarketsfor-CV.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10477\" class=\"size-full wp-image-10477\" src=\"https:\/\/www.techdesignforums.com\/practicefiles\/2019\/03\/HardwareAndSoftwareMarketsfor-CV.png\" alt=\"Figure 1. Hardware and software markets for computer vision (Tractica)\" width=\"640\" height=\"353\" srcset=\"https:\/\/www.techdesignforums.com\/practice\/files\/2019\/03\/HardwareAndSoftwareMarketsfor-CV.png 640w, https:\/\/www.techdesignforums.com\/practice\/files\/2019\/03\/HardwareAndSoftwareMarketsfor-CV-300x165.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-10477\" class=\"wp-caption-text\">Figure 1. Hardware and software markets for computer vision (Tractica)<\/p><\/div>\n<h2><strong>Computer vision challenges<\/strong><\/h2>\n<p>Design for computer vision is tough. Here are some of the more important challenges.<\/p>\n<ul>\n<li>Computer vision systems use computationally intensive convolutional neural networks (CNNs) for training and inference. These are testing the performance limits of standard platforms (e.g., GPU, CPU), and making the case for \u2018domain-specific\u2019 alternatives.<\/li>\n<li>Because many computer vision applications are safety-critical or time-sensitive, they undertake more edge processing than other AI technologies and thus must be done within a tight power budget.<\/li>\n<li>The market is still evolving rapidly. Alongside the computational load, algorithmic complexity is increasing all the time.<\/li>\n<\/ul>\n<p>According to Mike Fingeroff, HLS Technologist at Mentor, a Siemens Business, this type of environment requires a design flow that has three core qualities:<\/p>\n<ol>\n<li>It accelerates schedules.<\/li>\n<li>It allows for efficient hardware evaluation.<\/li>\n<li>It enables late stage changes.<\/li>\n<\/ol>\n<h2><strong>HLS for computer vision<\/strong><\/h2>\n<p>Let\u2019s consider those three requirements of a computer vision design infrastructure in turn.<\/p>\n<h3><strong>Schedules<\/strong><\/h3>\n<p>HLS shortens design cycles by raising design abstraction above RTL, typically using SystemC, C or C++ to define the project before synthesis. This is especially useful for computer vision because of a useful alignment between the hardware and algorithmic design environments. Badru Agarwala, General Manager with Mentor, explains:<\/p>\n<p>\u201cAlgorithm developers prefer to write code in C++, do not want to learn register transfer languages \u2013 such as Verilog or VHDL \u2013 and they do not want to use the tools and methodologies required for the hardware implementation process,\u201d he writes. \u201cTo address this problem, some algorithm developers write their code in C++ and then use high-level synthesis tools.\u201d<\/p>\n<p>In this way, the traditional benefits of HLS are further amplified.<\/p>\n<h3><strong>Evaluation<\/strong><\/h3>\n<p>The rate of change in computer vision algorithms makes system definition tricky. CNNs are computationally intensive and as algorithms are refined, it can therefore be difficult to get the optimal alignment between hardware and software. Here, as Agarwala again explains, some of the inherent advantages of HLS in terms of \u2018what if\u2019 analysis are important.<\/p>\n<p>\u201cDevelopers\u2026 quickly make tradeoffs and then automatically generate RTL.<\/p>\n<p>\u201cThese developers can try out multiple implementations of new algorithms, explore the performance and power consumptions of implementing these algorithms in hardware or software, and examine the tradeoffs of running on ASICs, FPGAs, CPUs,or GPUs.<\/p>\n<p>\u201cTradeoffs are also explored by varying the number of processor cores and experimenting with memory sizes and configurations.\u201d<\/p>\n<p>Time saved through design abstraction and the speed of the HLS process gives hardware and software a lot of latitude here.<\/p>\n<h3><strong>Late changes<\/strong><\/h3>\n<p>The evolution of computer vision implies that sometimes projects will need to cope with changes very late in the day. They may need a final tweak to the algorithm, or an increase\/reallocation in resources to realize an unfamiliar application.<\/p>\n<p>\u201cTeams need a way to design and verify an algorithm while the specifications and requirements evolve without starting over every time there is a change. HLS flows allow this by using constraints and directivews that guide the process, while leaving the algorithm unchanged,\u201d writes Agarwala.<\/p>\n<p>\u201cFor example, at the last minute, a team decides to change the clock speed. That constraint is changed and the HLS tool regenerates the RTL according to the new clock speed, with no change to the C++ algorithm.<\/p>\n<p>\u201cThis type of late-stage change is not possible in a traditional RTL glow, yet with HLS the RTL is rebuilt at the push of a button.\u201d<\/p>\n<p>A tried-and-tested HLS flow captures the three qualities (Figure 2).<\/p>\n<div id=\"attachment_10478\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.techdesignforums.com\/practicefiles\/2019\/03\/HLSFlow_Computer_Vision_Feature.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10478\" class=\"size-full wp-image-10478\" src=\"https:\/\/www.techdesignforums.com\/practicefiles\/2019\/03\/HLSFlow_Computer_Vision_Feature.png\" alt=\"Figure 2. The HLS flow (Mentor) Computer Vision feature\" width=\"640\" height=\"468\" srcset=\"https:\/\/www.techdesignforums.com\/practice\/files\/2019\/03\/HLSFlow_Computer_Vision_Feature.png 640w, https:\/\/www.techdesignforums.com\/practice\/files\/2019\/03\/HLSFlow_Computer_Vision_Feature-300x219.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-10478\" class=\"wp-caption-text\">Figure 2. The HLS flow (Mentor)<\/p><\/div>\n<p>Given the complexity of all AI development \u2013 and particularly the challenges computer vision poses \u2013 HLS provides a platform that brings together the software\/algorithm and hardware teams so that they can collaborate directly on an essentially consistent platform.<\/p>\n<p><a href=\"https:\/\/www.techdesignforums.com\/practicetechnique\/hls-high-level-synthesis-for-ai-part-two\/\">Part Two of this series<\/a> looks at how these project management and methodological goals can be realized in practice, and refers specifically to the development of computer vision IP for deep learning and inference object detection at Chips&amp;Media.<\/p>\n<h2><strong>Further reading<\/strong><\/h2>\n<p><a href=\"https:\/\/www.mentor.com\/hls-lp\/resources\/overview\/computer-vision-sees-a-bright-future-836b1c45-0d6f-41da-9561-e27218ddd247?cmpid=10166\">Computer Vision Sees a Bright Future<\/a><\/p>\n<p><a href=\"https:\/\/www.mentor.com\/hls-lp\/resources\/overview\/accelerate-computer-vision-design-using-high-level-synthesis-d120cc17-ba2c-488c-942e-cb110dae3cca?cmpid=10166\">Accelerate Computer Vision Design Using High-Level Synthesis<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The computational and algorithmic demands made by computer vision systems highlight HLS&#8217; value for AI system development.<\/p>\n","protected":false},"author":138,"featured_media":10358,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1386,160,41,38,1385],"tags":[2045,2276,2159,707,417,1924,2494,1697,2495,1903,2496,771,1257,1146,1909,2493,369,2113],"coauthors":[1441],"class_list":["post-10476","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-assembly-integration","category-design-management","category-esl-codesign","category-ic-implementation","category-choose-buy-ip","tag-ai","tag-algorithm","tag-artificial-intelligence","tag-automotive","tag-c","tag-cnn","tag-computer-vision","tag-convolutional-neural-networks","tag-cpu","tag-deep-learning","tag-domain-specific","tag-fpga","tag-gpu","tag-high-level-synthesis","tag-hls","tag-inference","tag-security","tag-training","workflow-analysis","workflow-expert-blog","workflow-up-to-date","organization-mentor"],"_links":{"self":[{"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/posts\/10476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/users\/138"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/comments?post=10476"}],"version-history":[{"count":0,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/posts\/10476\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/media\/10358"}],"wp:attachment":[{"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/media?parent=10476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/categories?post=10476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/tags?post=10476"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.techdesignforums.com\/practice\/wp-json\/wp\/v2\/coauthors?post=10476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}