<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213000689" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/8238" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/8238/hovercard" href="https://github.com/tensorflow/tensorflow/issues/8238">#8238</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">OS X 10.11.6<br>
$ clang --version<br>
Apple LLVM version 8.0.0 (clang-800.0.42.1)<br>
Target: x86_64-apple-darwin15.6.0<br>
Thread model: posix<br>
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</p>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
drwxrwxrwx  15 root  wheel  510 May  3  2015 CUDA-7.0<br>
David-Laxers-MacBook-Pro:tensorflow davidlaxer$ ls -l /Developer/NVIDIA/CUDA-7.0/lib/libcud*<br>
-rw-r--r--  1 davidlaxer  staff  292184 Mar  6  2015 /Developer/NVIDIA/CUDA-7.0/lib/libcudadevrt.a<br>
-rwxr-xr-x  1 davidlaxer  staff  274176 Mar  6  2015 /Developer/NVIDIA/CUDA-7.0/lib/libcudart.7.0.dylib<br>
lrwxr-xr-x  1 davidlaxer  staff      19 Mar  6  2015 /Developer/NVIDIA/CUDA-7.0/lib/libcudart.dylib -&gt; libcudart.7.0.dylib<br>
-rw-r--r--  1 davidlaxer  staff  562856 Mar  6  2015 /Developer/NVIDIA/CUDA-7.0/lib/libcudart_static.a<br>
If installed from binary pip package, provide:</p>
<ol dir="auto">
<li>A link to the pip package you installed:</li>
<li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.</li>
</ol>
<p dir="auto">print(tensorflow.<strong>version</strong>)<br>
1.0.1<br>
If installed from source, provide</p>
<ol dir="auto">
<li>The commit hash (<code class="notranslate">git rev-parse HEAD</code>)</li>
</ol>
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/99e30bc6b22b259ddc6a2cfc6aec1d9ebc635da4/hovercard" href="https://github.com/tensorflow/tensorflow/commit/99e30bc6b22b259ddc6a2cfc6aec1d9ebc635da4"><tt>99e30bc</tt></a></p>
<ol start="2" dir="auto">
<li>The output of <code class="notranslate">bazel version</code></li>
</ol>
<p dir="auto">Build label: 0.4.2<br>
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar<br>
Build time: Wed Dec 7 15:54:21 2016 (1481126061)<br>
Build timestamp: 1481126061<br>
Build timestamp as int: 1481126061</p>
<p dir="auto">There is a length/signed/unsigned mismatch in an inline vector initialization.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tensorflow/compiler/xla/service/allocation_tracker.cc:178:54: error: non-constant-expression cannot be narrowed from type 'std::vector&lt;se::DeviceMemoryBase&gt;::size_type' (aka 'unsigned long') to 'long long' in initializer list [-Wc++11-narrowing]
        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
                                                     ^
tensorflow/compiler/xla/service/allocation_tracker.cc:178:54: note: insert an explicit cast to silence this issue
        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
                                                     ^
                                                     static_cast&lt;long long&gt;( )
1 error generated."><pre class="notranslate"><code class="notranslate">tensorflow/compiler/xla/service/allocation_tracker.cc:178:54: error: non-constant-expression cannot be narrowed from type 'std::vector&lt;se::DeviceMemoryBase&gt;::size_type' (aka 'unsigned long') to 'long long' in initializer list [-Wc++11-narrowing]
        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
                                                     ^
tensorflow/compiler/xla/service/allocation_tracker.cc:178:54: note: insert an explicit cast to silence this issue
        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
                                                     ^
                                                     static_cast&lt;long long&gt;( )
1 error generated.
</code></pre></div>
<p dir="auto">diff:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- a/tensorflow/compiler/xla/service/allocation_tracker.cc
+++ b/tensorflow/compiler/xla/service/allocation_tracker.cc
@@ -175,7 +175,7 @@ StatusOr&lt;std::vector&lt;GlobalDataHandle&gt;&gt; AllocationTracker::DeconstructTuple(
        i &lt; element_bases.size(); ++i) {
     element_handles.push_back(RegisterInternal(
         allocation-&gt;backend(), allocation-&gt;device_ordinal(), element_bases[i],
-        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
+        ShapeUtil::GetSubshape(allocation-&gt;shape(), {static_cast&lt;long long&gt;(i)}),
         tensorflow::strings::StrCat(allocation-&gt;tag(), &quot;.element_&quot;, i),
         /*initial_ref_count=*/2));
   }"><pre class="notranslate"><code class="notranslate">--- a/tensorflow/compiler/xla/service/allocation_tracker.cc
+++ b/tensorflow/compiler/xla/service/allocation_tracker.cc
@@ -175,7 +175,7 @@ StatusOr&lt;std::vector&lt;GlobalDataHandle&gt;&gt; AllocationTracker::DeconstructTuple(
        i &lt; element_bases.size(); ++i) {
     element_handles.push_back(RegisterInternal(
         allocation-&gt;backend(), allocation-&gt;device_ordinal(), element_bases[i],
-        ShapeUtil::GetSubshape(allocation-&gt;shape(), {i}),
+        ShapeUtil::GetSubshape(allocation-&gt;shape(), {static_cast&lt;long long&gt;(i)}),
         tensorflow::strings::StrCat(allocation-&gt;tag(), ".element_", i),
         /*initial_ref_count=*/2));
   }
</code></pre></div>