Here is the gist of my code, along with the error in the comments.

  
      gist.github.com
  
  
    https://gist.github.com/kris-singh/ce5fbdb8aa242ed3357d27c3e8fdea5f 7
temp.cpp
#include <torch/torch.h>
#include <iostream>
#include <ATen/Parallel.h>
#include <ATen/Aten.h>

using namespace at;
// using namespace torch;

void submodular_select(Tensor candidate_points, Tensor features_done, Tensor features)
{
This file has been truncated. show original




  
  
    
    
  
  


I tried to debug the issue using lldb. I found that for the *this, src and index tensors all variables numel are correct. But when trying to get their sizes() it shows 1. I don’t really understand why this is happening. Also in the error message should tell which tensor was half constructed.
When submitting a bug report, please include the following information (where relevant):

OS: MacOsX
PyTorch version: 1.0
How you installed PyTorch (conda, pip, source): conda
Python version: 3.7
CUDA/cuDNN version: None
GPU models and configuration: None
GCC version (if compiling from source): AppleClang 10.0.0.10001145

Also, an unrelated not do you know how I could get code completion and definition look. Right now I have to ag search the aten directory for finding what I want to use.