I’m going insane trying to compile extension code that compiles normally with torch.utils.cpp_extension.CppExtension or setuptools. I want to compile a separate .cpp program that simply tests the CUDA kernel, so that I can profile the behavior of the kernel with NVVP. The issue here is that the cpp package I have now uses torch tensors from ATen.
With the current Makefile that I have, if I try to use even the tiniest bit of ATen code, I get bizarre linkage errors that look a lot like:

  
      github.com/pytorch/pytorch
  
  
    



Issue: C++ link error


	
	opened by XuhuiSun95
	on 2019-01-30
	
	
	closed by XuhuiSun95
	on 2019-01-30
	


🐛 Bug compile together with glog/gflags and thrift results undefined reference
To Reproduce
Steps to reproduce the behavior:
Using stable(1.0) Linux LibTorch C++ CUDA9.0
Compile...




  
  
    
    
  
  


Can someone help me out of this mess? Should I try to learn to use a CMake file? Where would I go to learn to do that?