Tutorial for Hardware Designer

username: Xusine1131
cooked: <p>Hi and I’m new to the Glow compiler. In fact, I’m designing an accelerator and I hope to write a Glow backend for it. Is there any good reference or tutorial for me?</p>
<p>Thanks a lot!</p>

username: leejaymin
cooked: <p>I am also interested in this topic.</p>

username: jfix
cooked: <p>Hi <a class="mention" href="/u/xusine1131">@Xusine1131</a> <a class="mention" href="/u/leejaymin">@leejaymin</a> – thanks for your interest! We had a really simple example PR put up ~6 weeks ago to help people get started here. It didn’t land but you can take a look there, as well as a little bit of the discussion there. Hopefully this is a good place to get started, and if you have suggestions or document some of the things that opti-mix mentioned in the comments.</p>
<aside class="onebox githubpullrequest">
  <header class="source">
      <a href="https://github.com/pytorch/glow/pull/3991" target="_blank" rel="nofollow noopener">github.com/pytorch/glow</a>
  </header>
  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Pull Request">
    <svg width="60" height="60" class="github-icon" viewbox="0 0 12 16" aria-hidden="true"><path d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/glow/pull/3991" target="_blank" rel="nofollow noopener">Simple example backend that performs individual SLS ops</a>
    </h4>

    <div class="branches">
      <code>pytorch:master</code> ← <code>bertmaher:example_sls</code>
    </div>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2020-01-08" data-time="23:36:36" data-timezone="UTC">11:36PM - 08 Jan 20 UTC</span>
      </div>

      <div class="user">
        <a href="https://github.com/bertmaher" target="_blank" rel="nofollow noopener">
          <img alt="bertmaher" src="https://avatars1.githubusercontent.com/u/4441820?v=4" class="onebox-avatar-inline" width="20" height="20">
          bertmaher
        </a>
      </div>

      <div class="lines" title="1 commits changed 4 files with 538 additions and 0 deletions">
        <a href="https://github.com/pytorch/glow/pull/3991/files" target="_blank" rel="nofollow noopener">
          <span class="added">+538</span>
          <span class="removed">-0</span>
        </a>
      </div>
    </div>

  </div>
</div>
  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


username: Xusine1131
cooked: <p><a class="mention" href="/u/jfix">@jfix</a> Thanks for your example! That’s a good reference, and it’s quite neat.<br>
By the way, is there any code for self-defined the Glow Runtime?  I think a runtime might be necessary as well. Thanks!</p>

username: jfix
cooked: <p>I don’t think we have any examples for building out a bigger runtime other than what you see in the Example backend for implementing an <code>ExampleFunction</code>. In general the runtime tends to be more important for JIT compilation/server uses cases, whereas many open source users care more about ahead of time compilation of a binary. CC: <a class="mention" href="/u/gcatron">@gcatron</a></p>

username: Xusine1131
cooked: <p>Thanks! I think I have understood the concept of runtime.</p>

username: iman_barzegari
cooked: <p>i need a tutorial for add external backend that use HMC</p>