Good afternoon,
I have been trying to compile some CPP extension I coded 2 years ago but on the newest version of pytorch for the past 2 days.
I keep receiving the error : undefined symbole : _ZNK2at10TensorBase8data_ptrIPfEEPT_v
when importing the extension compiled.
I checked cuda toolkit and pytorch and spent some time matching them between system and conda and pytorch, there is no error during compilation and I even reduced all the code to one function which is as follow to try to debug that :
void compute_distances(int b, int n, int m, at::Tensor xyz1p, at::Tensor xyz2p){
auto xyz1 = xyz1p.contiguous().data<float*>();
auto xyz2 = xyz2p.contiguous().data<float*>();
for (int i=0;i<b;++i) {
float x1 = xyz1[i][0];
float y1 = xyz1[i][1];
float z1 = xyz1[i][2];
for (int j=0;j<b;++j) {
float x2 = xyz1[j][0];
float y2 = xyz1[j][1];
float z2 = xyz1[j][2];
auto distance = sqrtf((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1));
xyz2[i][j] = distance;
}
}
}
Any idea what might be the cause this time ?
My guess is that it is coming from the arrays and how I am handling the C++ float **, but I am really not sure.
Yours faithfully
Justin L
PS : I am importing torch before the extension of course