TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

XLA: linear algebra library for TensorFlow

176 点作者 mud_dauber大约 8 年前

7 条评论

Marat_Dukhan大约 8 年前
&gt;&gt;&gt; Softmax can be implemented as a composition of primitive TensorFlow ops (exponent, reduction, elementwise division, etc.): softmax = exp(logits) &#x2F; reduce_sum(exp(logits), dim)<p>No, it can not be implemented this way, it is numerically unstable, and will produce NaNs if any input is greater than ~88.7. Luckily, it is also not how its implemented in Tensorflow: <a href="https:&#x2F;&#x2F;github.com&#x2F;tensorflow&#x2F;tensorflow&#x2F;blob&#x2F;2c8d0dca978a246f54c506aae4587dbce5d3bcf0&#x2F;tensorflow&#x2F;core&#x2F;kernels&#x2F;softmax_op_functor.h#L43" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tensorflow&#x2F;tensorflow&#x2F;blob&#x2F;2c8d0dca978a24...</a><p>For a clean (and more efficient) C version of this algorithm, take a look at NNPACK reference implementation: <a href="https:&#x2F;&#x2F;github.com&#x2F;Maratyszcza&#x2F;NNPACK&#x2F;blob&#x2F;master&#x2F;src&#x2F;ref&#x2F;softmax-output.c#L30" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Maratyszcza&#x2F;NNPACK&#x2F;blob&#x2F;master&#x2F;src&#x2F;ref&#x2F;so...</a>
评论 #13818028 未加载
评论 #13818046 未加载
theCricketer大约 8 年前
Chris Leary, a compiler engineer at Google gave a talk about XLA at the recent Tensorflow Dev Summit:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kAOanJczHA0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kAOanJczHA0</a>
jakekovoor大约 8 年前
Thank you OP, this is really helpful. :)<p>If you need to install TensorFlow on Windows 10 you can follow this<p><a href="http:&#x2F;&#x2F;saintlad.com&#x2F;install-tensorflow-on-windows&#x2F;" rel="nofollow">http:&#x2F;&#x2F;saintlad.com&#x2F;install-tensorflow-on-windows&#x2F;</a>
评论 #13825640 未加载
评论 #13820145 未加载
visarga大约 8 年前
It would seem Torch&#x2F;PyTorch are faster than TF. TF uses static optimizations on the computation graph while Torch has a dynamic computation graph. Logically, static optimizations should be faster because they know the data size beforehand.<p>So, why is TF slower?
评论 #13818017 未加载
评论 #13821146 未加载
评论 #13820110 未加载
shoshin23大约 8 年前
I&#x27;ve been looking around in a few places but I can&#x27;t find a way to use XLA to compile tensorflow models for mobile devices. Is there a tutorial&#x2F;blogpost by google(or anyone for that matter) talking about it? Thanks!
评论 #13825276 未加载
ndesaulniers大约 8 年前
Even if you&#x27;re not interested in machine learning or ai, XLA and particularly it&#x27;s Python bindings are a great and easy way to do GPGPU programming.
probdist大约 8 年前
Why does this support JIT but not AOT for NVIDIA GPUs?
评论 #13818045 未加载