JNeRF icon indicating copy to clipboard operation
JNeRF copied to clipboard

fatal error LNK1120: 1 unresolved externals

Open shijunfeng00 opened this issue 3 years ago • 0 comments

系统:Windows10 命令:python jnerf/tools/run_net.py --config-file configs/jnerf/ngp_llff.py 环境:Python 3.8.13

llff格式的文件可以在nerf-pytorch中正常训练,在jnerf中编译报错

具体报错信息如下:

image

image

` Loading config from: configs/jnerf/ngp_llff.py HOLDOUT view is 12 Auto LLFF holdout, 8 create data/fern\split.json 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [00:00<00:00, 103.56it/s] HOLDOUT view is 12 Auto LLFF holdout, 8 0%| | 0/3 [00:00<?, ?it/s] Compiling Operators(11/11) used: 48.3s eta: 0s 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:48<00:00, 16.17s/it] Warning:Default max value of NeRF dataset's aabb_scale is 16, but now is 64. You can increase this max_aabb_scale limit by factors of 2 by incrementing NERF_CASCADES. We automatically help you set NERF_CASCADES to 7, which may result in slower speeds. 0%| | 0/40000 [00:00<?, ?it/s] Compiling Operators(40/40) used: 163s eta: 0s [e 1010 18:34:16.263000 12 log.cc:565] cl : Command line warning D9025 : overriding '/EHa' with '/EHs' code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.cc cl : Command line warning D9025 : overriding '/EHa' with '/EHs' code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.cc code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.cc cl : Command line warning D9025 : overriding '/EHa' with '/EHs' cl : Command line warning D9025 : overriding '/EHa' with '/EHs' Creating library C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____has h_f79e8ce28b3203ea_op.lib and object C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SI ZE_2__out0____hash_f79e8ce28b3203ea_op.exp tmpxft_00006864_00000000-19_code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.obj : error LNK2019: unresolved external symbol "struct pcg32 jittor::rng" (?rng@j ittor@@3Upcg32@@A) referenced in function "public: void __cdecl jittor::CodeOp::jit_run(void)" (?jit_run@CodeOp@jittor@@QEAAXXZ) C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_o p.dll : fatal error LNK1120: 1 unresolved externals

0%| | 0/40000 [02:49<?, ?it/s] Traceback (most recent call last): File "jnerf/tools/run_net.py", line 75, in main() File "jnerf/tools/run_net.py", line 66, in main runner.train() File "c:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\runner\runner.py", line 70, in train pos, dir = self.sampler.sample(img_ids, rays_o, rays_d, is_training=True) File "c:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\samplers\density_grid_sampler\density_grid_sampler.py", line 139, in sample self.update_density_grid() File "c:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\samplers\density_grid_sampler\density_grid_sampler.py", line 259, in update_density_grid self.update_density_grid_nerf( File "c:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\samplers\density_grid_sampler\density_grid_sampler.py", line 219, in update_density_grid_nerf density_grid_positions_uniform, density_grid_indices_uniform = self.generate_grid_samples_nerf_nonuniform.execute( File "c:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\samplers\density_grid_sampler\generate_grid_samples_nerf_nonuniform.py", line 50, in execute output[0].sync() RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.sync)).

Types of your inputs are: self = Var, args = (),

The function declarations are: void sync(bool device_sync = false, bool weak_sync = true)

Failed reason:[f 1010 18:34:16.266000 12 parallel_compiler.cc:329] Error happend during compilation: [Error] source file location:C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__o ut0____hash_f79e8ce28b3203ea_op.cc Compile operator(0/1)failed:Op(833:1:2:2:i2:o2:s0,code->...)

Reason: [f 1010 18:34:16.264000 12 log.cc:608] Check failed ret(2) == 0(0) Run cmd failed: "C:\Users\Shijunfeng.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe" "C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Window s-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__IN_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.cc" -shared -L"c:\users\shijunfeng\anaconda3\e nvs\pytorch\libs" -lpython38 -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8 -I"C:\Users\Shijunfeng.cache\jittor\msvc\VC\include" -I"C:\Users\Shijunfeng.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\Shijunfeng.ca che\jittor\msvc\win10_kits\include\shared" -I"C:\Users\Shijunfeng.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX -L"C:\Users\Shijunfeng.cache\jittor\msvc\VC\lib" -L"C:\Users\Shijunfeng.cache\jittor\msvc\win10_kits\lib\u m\x64" -L"C:\Users\Shijunfeng.cache\jittor\msvc\win10_kits\lib\ucrt\x64" -I"c:\users\shijunfeng\anaconda3\envs\pytorch\lib\site-packages\jittor\src" -I"c:\users\shijunfeng\anaconda3\envs\pytorch\include" -DHAS_CUDA -DIS_CUDA - I"C:\Users\Shijunfeng.cache\jittor\jtcuda\cuda11.2_cudnn8_win\include" -I"c:\users\shijunfeng\anaconda3\envs\pytorch\lib\site-packages\jittor\extern\cuda\inc" -lcudart -L"C:\Users\Shijunfeng.cache\jittor\jtcuda\cuda11.2_cudnn 8_win\lib\x64" -L"C:\Users\Shijunfeng.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin" -I"C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67" -L"C:\Users\Shijunfeng.cache\j ittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67" -L"C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default" -l"jit_utils_core.cp38-win_amd64" -l"jittor _core.cp38-win_amd64" -x cu --cudart=shared -ccbin="C:\Users\Shijunfeng.cache\jittor\msvc\VC_____\bin\cl.exe" --use_fast_math -w -I"c:\users\shijunfeng\anaconda3\envs\pytorch\lib\site-packages\jittor\extern/cuda/inc" - arch=compute_75 -code=sm_75 -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\position_encoders\hash_encoder\op_header -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\position_encoders\sh_e ncoder\op_header -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\models\samplers\density_grid_sampler\op_header -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\ops\code_ops..\op_include/eigen -Ic:\user s\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\ops\code_ops..\op_include/include -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\python\jnerf\ops\code_ops..\op_include/pcg32 -Ic:\users\shijunfeng\desktop\3drebuild\jnerf\pytho n\jnerf\ops\code_ops..\op_include/../op_header -DGLOBAL_VAR --extended-lambda --expt-relaxed-constexpr -o "C:\Users\Shijunfeng.cache\jittor\jt1.3.5\cl\py3.8.13\Windows-10-10.xf7\AMDRyzen73700Xx25\default\cu11.2.67\jit\code__I N_SIZE_2__in0_dim_1__in0_type_float32__in1_dim_1__in1_type_int32__OUT_SIZE_2__out0____hash_f79e8ce28b3203ea_op.dll" -Xlinker -EXPORT:"?jit_run@CodeOp@jittor@@QEAAXXZ"

`

shijunfeng00 avatar Oct 10 '22 10:10 shijunfeng00