nerfstudio-project / nerfacc

A General NeRF Acceleration Toolbox in PyTorch.
https://www.nerfacc.com/
Other
1.38k stars 112 forks source link

extension compile error on Windows #141

Closed machenmusik closed 1 year ago

machenmusik commented 1 year ago

On Windows, using nerfacc 0.3.2 extension (e.g. for nerfstudio instant-ngp) gives a compile error

No checkpoints to load, training from scratch
(   ●  ) NerfAcc: Setting up CUDA (This may take a few minutes the first time)

then error (last few error lines below)

   Creating library nerfacc_cuda.lib and object nerfacc_cuda.exp
pack.cuda.o : error LNK2019: unresolved external symbol "public: long * __cdecl at::TensorBase::data_ptr<long>(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ) referenced in function "class at::Tensor __cdecl unpack_info(class at::Tensor,int)" (?unpack_info@@YA?AVTensor@at@@V12@H@Z)
ray_marching.cuda.o : error LNK2001: unresolved external symbol "public: long * __cdecl at::TensorBase::data_ptr<long>(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ)
nerfacc_cuda.pyd : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.

(See https://github.com/nerfstudio-project/nerfstudio/issues/1215.)

liruilong940607 commented 1 year ago

Thanks and this is fixed in fb876fd