title: Unable to use cuda compiled code with pytorch
body: <p>I would like to calculate the nms using the cuda based code and use it together with torch. Following is my code,</p>
  <pre><code>this_file = os.path.dirname(os.path.realpath(__file__))
  print(this_file)
  extra_objects = ['src/cuda/nms_kernel.cu.o']
  extra_objects = [os.path.join(this_file, fname) for fname in extra_objects]
  
  ffi = BuildExtension(
      '_ext.nms',
      headers=headers,
      sources=sources,
      define_macros=defines,
      relative_to=__file__,
      with_cuda=with_cuda,
      extra_objects=extra_objects
  )
  </code></pre>
  <p>However it throws the following error,</p>
  <blockquote>
  <p>File &quot;build.py&quot;, line 19, in 
  extra_objects=extra_objects   File &quot;C:\Users\anaconda3\envs\envname\lib\site-packages\torch\utils\cpp_extension.py&quot;,
  line 292, in <strong>init</strong>
  super(BuildExtension, self).<strong>init</strong>(*args, **kwargs)   File &quot;C:\Userss\anaconda3\envs\envname\lib\site-packages\setuptools_<em>init</em>_.py&quot;,
  line 184, in <strong>init</strong>
  _Command.<strong>init</strong>(self, dist)   File &quot;C:\Users\anaconda3\envs\envname\lib\distutils\cmd.py&quot;, line 57, in
  <strong>init</strong>
  raise TypeError(&quot;dist must be a Distribution instance&quot;) TypeError: dist must be a Distribution instance</p>
  </blockquote>
  <p>what am I missing?</p>