Build from source and make whl on Linux

username: Soonmyun_Jang
cooked: <p>I want to make whl file on Linux and then install the created whl on Windows because I have problem during building pytorch on Windows.<br>
Is there any way to build from source and make whl for Windows on Linux?</p>

username: peterjc123
cooked: <p>What problems have you met when you try to create whl on Windows? As far as I know, you could not cross compile for Windows because MSVC is not available on Linux.</p>

username: Soonmyun_Jang
cooked: <p>Thank you for your answer. So there is no way to do cross compile, right?</p>
<p>I have met many errors while I try to build pytorch on Windows10.</p>
<p>Following this project: <a href="https://github.com/Lavender105/DFF" rel="nofollow noopener">https://github.com/Lavender105/DFF</a><br>
I want to change OS from Linux to Windows10. But this project uses a branch of pytorch which is  ed02619.<br>
To build the specific pytorch branch (ed02619) of a project, I followed this video: <a href="https://www.youtube.com/watch?v=sGWLjbn5cgs" rel="nofollow noopener">https://www.youtube.com/watch?v=sGWLjbn5cgs</a><br>
However, it was failed.</p>
<p>There is the log below:<br>
<aside class="onebox githubgist">
  <header class="source">
      <a href="https://gist.github.com/JANGSOONMYUN/a380e6876122d2cf5c1beb3aaa5d2e65" target="_blank" rel="nofollow noopener">gist.github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://gist.github.com/JANGSOONMYUN/a380e6876122d2cf5c1beb3aaa5d2e65" target="_blank" rel="nofollow noopener">https://gist.github.com/JANGSOONMYUN/a380e6876122d2cf5c1beb3aaa5d2e65</a></h4>
<h5>build_error_pytorch.txt</h5>
<pre><code class="Text">(dff-master) C:\Users\RobotArm\Desktop\Epson Robot Arm\Projects\DFF_project\pytorch-master\pytorch&gt;cuda90.bat
Ninja found, using it to speed up builds
MAGMA_HOME is set. MAGMA will be included in build.
The flags after configuration:
NO_CUDA=
CMAKE_GENERATOR=Ninja
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
DISTUTILS_USE_SDK=1
Do you wish to continue? (Y/N)
Type input: Y</code></pre>
This file has been truncated. <a href="https://gist.github.com/JANGSOONMYUN/a380e6876122d2cf5c1beb3aaa5d2e65" target="_blank" rel="nofollow noopener">show original</a>

<p>
</p>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>

username: peterjc123
cooked: <p>I didn’t get why do you need to compile PyTorch from source. We have 1.0 binaries on <a href="https://pytorch.org/" rel="nofollow noopener">https://pytorch.org/</a>.</p>

username: Soonmyun_Jang
cooked: <p>Yes but the project that I’m using uses a different branch of pytorch.<br>
I think the writer of the project modified pytorch in order to use multi-gpu. And he also used pytorch-encoding for multi-gpu (<a href="https://github.com/zhanghang1989/PyTorch-Encoding" rel="nofollow noopener">https://github.com/zhanghang1989/PyTorch-Encoding</a>).</p>
<p>Therefore, if I want to use the original pytorch, maybe I need to modify entire source code.</p>

username: peterjc123
cooked: <p>Which branch of pytorch are you using?</p>

username: Soonmyun_Jang
cooked: <p>It’s ed02619</p>
<p>You can follow this:<br>
<aside class="onebox githubblob">
  <header class="source">
      <a href="https://github.com/Lavender105/DFF/blob/master/INSTALL.md" target="_blank" rel="nofollow noopener">github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://github.com/Lavender105/DFF/blob/master/INSTALL.md" target="_blank" rel="nofollow noopener">Lavender105/DFF/blob/master/INSTALL.md</a></h4>
<pre><code class="lang-md">## Requirements:

Pytorch 1.0

cuda 9.0

cudnn v7.3

nccl v2.3.7

## Step-by-step installation
### 1. Install Pytorch from source
(1) download pytorch and checkout to version ed02619
```
mkdir pytorch-master
cd pytorch-master
git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch
git checkout ed02619
git submodule init
</code></pre>

  This file has been truncated. <a href="https://github.com/Lavender105/DFF/blob/master/INSTALL.md" target="_blank" rel="nofollow noopener">show original</a>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>

username: peterjc123
cooked: <p>I checked. <a href="https://github.com/pytorch/pytorch/tree/ed02619" rel="nofollow noopener">https://github.com/pytorch/pytorch/tree/ed02619</a> is even with master. So you may just use the nightly package.</p>

username: Soonmyun_Jang
cooked: <p>I see. I will try other ways. Thank you anyway.</p>