<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PyTorch on Infinite Script</title><link>https://www.infinitescript.com/tags/pytorch/</link><description>Recent content in PyTorch on Infinite Script</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 28 Mar 2018 12:30:58 +0000</lastBuildDate><atom:link href="https://www.infinitescript.com/tags/pytorch/index.xml" rel="self" type="application/rss+xml"/><item><title>Build PyTorch Extensions with CUDA and CFFI</title><link>https://www.infinitescript.com/2018/03/build-pytorch-extensions-with-cuda-and-cffi/</link><pubDate>Wed, 28 Mar 2018 12:30:58 +0000</pubDate><guid>https://www.infinitescript.com/2018/03/build-pytorch-extensions-with-cuda-and-cffi/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Deprecated warning&lt;/strong&gt;: PyTorch 1.0+ replaced the old TH/THC tensor backend with ATen, and the &lt;code&gt;torch.utils.ffi&lt;/code&gt; toolchain described here was removed along the way. If you target PyTorch 1.0 or newer, write your extensions with &lt;code&gt;torch.utils.cpp_extension&lt;/code&gt; instead, see &lt;a href="https://github.com/hzxie/GRNet/tree/master/extensions"&gt;this GitHub repository&lt;/a&gt; for a working example. The article below documents the older CFFI-based approach and is kept for reference.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Python is one of the most popular languages for deep learning, but as an interpreted language it is slow at tight numerical loops. Most of the time this does not matter, because the heavy lifting happens inside libraries written in C and CUDA. It starts to matter the moment you need an operation that the framework does not provide out of the box.&lt;/p&gt;</description></item></channel></rss>