Skip to content

Commit

Permalink
Site updated: 2020-04-26 22:31:16
Browse files Browse the repository at this point in the history
  • Loading branch information
feihugis committed Apr 27, 2020
1 parent 7b0735d commit e3303a8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
10 changes: 6 additions & 4 deletions 2020/04/26/How-TensorFlow-Python-APIs-are-generated/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
var CONFIG = {"hostname":"feihugis.github.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
</script>

<meta name="description" content="TensorFlow Python APIs are automatically generated by Pybind11 and some utility scripts. This blog introduces how these Python APIs are generated. 1. bazel build --config&#x3D;opt &#x2F;&#x2F;tensorflow&#x2F;tools&#x2F;pip_pa">
<meta name="description" content="TensorFlow Python APIs are automatically generated by Pybind11 and some utility scripts. This blog introduces how these Python APIs are generated.">
<meta property="og:type" content="article">
<meta property="og:title" content="How TensorFlow Python APIs are generated">
<meta property="og:url" content="https://feihugis.github.io/2020/04/26/How-TensorFlow-Python-APIs-are-generated/index.html">
<meta property="og:site_name" content="Fei&#39;s Blog">
<meta property="og:description" content="TensorFlow Python APIs are automatically generated by Pybind11 and some utility scripts. This blog introduces how these Python APIs are generated. 1. bazel build --config&#x3D;opt &#x2F;&#x2F;tensorflow&#x2F;tools&#x2F;pip_pa">
<meta property="og:description" content="TensorFlow Python APIs are automatically generated by Pybind11 and some utility scripts. This blog introduces how these Python APIs are generated.">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2020-04-27T05:27:28.000Z">
<meta property="article:modified_time" content="2020-04-27T05:27:28.752Z">
<meta property="article:modified_time" content="2020-04-27T05:29:52.540Z">
<meta property="article:author" content="Fei Hu">
<meta property="article:tag" content="TensorFlow">
<meta name="twitter:card" content="summary">
Expand Down Expand Up @@ -188,8 +188,9 @@ <h1 class="post-title" itemprop="name headline">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">Posted on</span>


<time title="Created: 2020-04-26 22:27:28" itemprop="dateCreated datePublished" datetime="2020-04-26T22:27:28-07:00">2020-04-26</time>
<time title="Created: 2020-04-26 22:27:28 / Modified: 22:29:52" itemprop="dateCreated datePublished" datetime="2020-04-26T22:27:28-07:00">2020-04-26</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
Expand Down Expand Up @@ -217,6 +218,7 @@ <h1 class="post-title" itemprop="name headline">


<p>TensorFlow Python APIs are automatically generated by Pybind11 and some utility scripts. This blog introduces how these Python APIs are generated.</p>
<a id="more"></a>
<h3 id="1-bazel-build-config-opt-tensorflow-tools-pip-package-build-pip-package"><a href="#1-bazel-build-config-opt-tensorflow-tools-pip-package-build-pip-package" class="headerlink" title="1. bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package"></a>1. <code>bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package</code></h3><p>This command builds TensorFlow Python packages, including automatically generating Python APIs. The corresponding BUILD file is located at <code>tensorflow/tools/pip_package/BUILD</code> as below:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">sh_binary(</span><br><span class="line"> name &#x3D; &quot;build_pip_package&quot;,</span><br><span class="line"> srcs &#x3D; [&quot;build_pip_package.sh&quot;],</span><br><span class="line"> data &#x3D; COMMON_PIP_DEPS +</span><br><span class="line"> select(&#123;</span><br><span class="line"> &quot;&#x2F;&#x2F;tensorflow:windows&quot;: [</span><br><span class="line"> &quot;:simple_console_for_windows&quot;,</span><br><span class="line"> ],</span><br><span class="line"> &quot;&#x2F;&#x2F;conditions:default&quot;: [</span><br><span class="line"> &quot;:simple_console&quot;,</span><br><span class="line"> ],</span><br><span class="line"> &#125;) +</span><br><span class="line"> select(&#123;</span><br><span class="line"> &quot;&#x2F;&#x2F;tensorflow:dynamic_loaded_kernels&quot;: DYNAMIC_LOADED_KERNELS,</span><br><span class="line"> &quot;&#x2F;&#x2F;conditions:default&quot;: [],</span><br><span class="line"> &#125;) + if_mkl_ml([&quot;&#x2F;&#x2F;third_party&#x2F;mkl:intel_binary_blob&quot;]),</span><br><span class="line">)</span><br></pre></td></tr></table></figure>
<p>Where, <code>COMMON_PIP_DEPS</code> contains all the Python dependencies.</p>
Expand Down
Loading

0 comments on commit e3303a8

Please sign in to comment.