Error when compiling a Sum node

Wilbur: <h1><a name="error-description-1" class="anchor" href="#error-description-1"></a>Error Description</h1>
<p>I have a simple model with only a <code>Sum</code> node taking as input three constant values, with shape <code>(1, 1)</code>, <code>(2, 2)</code>, and <code>(2, 2)</code> respectively. However, <code>Glow</code> cannot compile it, whereas <code>onnxruntime</code> can successfully run it and output the expected value.</p>
<p>The model definition viewed in <a href="https://www.netron.app/" rel="noopener nofollow ugc">https://www.netron.app/</a> is like this:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/1/11684fad6e3c13684562e9de6ebc1904c8e268cc.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/11684fad6e3c13684562e9de6ebc1904c8e268cc" title="model_def"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/1/11684fad6e3c13684562e9de6ebc1904c8e268cc_2_610x499.jpeg" alt="model_def" data-base62-sha1="2tZBn9PXekR8BTHTj53RBhAqIt6" width="610" height="499" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/1/11684fad6e3c13684562e9de6ebc1904c8e268cc_2_610x499.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/1/1/11684fad6e3c13684562e9de6ebc1904c8e268cc_2_915x748.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/1/1/11684fad6e3c13684562e9de6ebc1904c8e268cc.jpeg 2x" data-dominant-color="BFE3C3"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">model_def</span><span class="informations">1138×932 50.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>When compiled with the command <code>[where your glow-build resides]/glow-build/bin/model-compiler -backend=CPU -model=model.onnx -emit-bundle=build -network-name=model</code>, <code>Glow</code> outputs the following error message:</p>
<pre><code class="lang-auto">Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 1 for input 0 and 1
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 2 for input 0 and 1
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 1 for input 0 and 2
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 2 for input 0 and 2
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 1 for input 0 and 1
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 2 for input 0 and 1
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 1 for input 0 and 2
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
Concat
name : Sum_7
Dim : 0
users : 1
Inputs0 : float&lt;1 x 1 x 1&gt;
Inputs1 : float&lt;1 x 2 x 2&gt;
Inputs2 : float&lt;1 x 2 x 2&gt;
Result : float&lt;3 x 1 x 1&gt;

Mismatching dimension 2 for input 0 and 2
For comparison `LHS Equal RHS` with:
LHS: 1
RHS: 2
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0807 15:45:15.207857 43561 Error.cpp:121] exitOnError(Error) got an unexpected ErrorValue: 
Error message: Function verification failed.
</code></pre>
<h1><a name="how-to-reproduce-2" class="anchor" href="#how-to-reproduce-2"></a>How To Reproduce</h1>
<p>You can download the package at <a href="https://drive.google.com/file/d/1jFtfIVAMw76qctM_mhFfPxr_4geCWpuV/view?usp=sharing" class="inline-onebox" rel="noopener nofollow ugc">sum_reproduce.zip - Google Drive</a>. After unzipping it, you can follow the steps in <code>README.md</code> to reproduce the results.</p>
<p>System Information:</p>
<p>Glow version: built from GitHub source <code>commit 07a82bd9fe97dfd2e8ea0f4742dce5ce86177c2b</code></p>
<p>onnxruntime version: <code>1.7.0</code></p>
<p>onnx version: <code>1.9.0</code></p>
<p>Operation system: Ubuntu 18.04LTS</p>
<p>CPU: Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz 16 cores</p>