Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用export.py导出pointpillar模型出错 #463

Open
ABBoyangCD opened this issue May 11, 2024 · 0 comments
Open

使用export.py导出pointpillar模型出错 #463

ABBoyangCD opened this issue May 11, 2024 · 0 comments
Assignees

Comments

@ABBoyangCD
Copy link

(paddle-env) PS F:\paddlepaddle\Paddle3D> python tools/export.py --config configs/pointpillars/pointpillars_xyres16_kitti_car.yml --model outputs/pointpillars/model.pdparams --save_dir outputs/pointpillars/inference_model
ortools not installed, install it by "pip install ortools==9.1.9490" if you run BEVLaneDet model
W0511 09:55:56.148032 15912 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 12.2, Runtime API Version: 11.7
W0511 09:55:56.153033 15912 gpu_resources.cc:164] device: 0, cuDNN Version: 8.4.
2024-05-11 09:55:57,764 - INFO - There are 106/106 variables loaded into PointPillars.
C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py:712: UserWarning: full_graph=False don't support input_spec arguments. It will not produce any effect.
You can set full_graph=True, then you can assign input spec.

warnings.warn(
C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\framework.py:3044: UserWarning: The Attr(force_cpu) of Op(fill_constant) will be deprecated in the future, please use 'device_guard' instead. 'device_guard' has higher priority when they are used at the same time.
warnings.warn(
2024-05-11 09:56:00,736 - WARNING - No custom op iou3d_nms found, try JIT build
Compiling user custom op, it will cost a few seconds.....
[2024-05-11 09:56:03,194] [ INFO] dist.py:985 - running build
[2024-05-11 09:56:03,194] [ INFO] dist.py:985 - running build_ext
C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:1454: UserWarning: Failed to check compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(
[2024-05-11 09:56:03,398] [ INFO] build_ext.py:521 - building 'iou3d_nms' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
2024-05-11 09:56:03,652 - ERROR - iou3d_nms builded fail!
Traceback (most recent call last):
File "F:\paddlepaddle\Paddle3D\tools\export.py", line 168, in
main(args, rest_args)
File "F:\paddlepaddle\Paddle3D\tools\export.py", line 156, in main
model.export(args.save_dir, name=args.save_name, **kwargs)
File "f:\paddlepaddle\paddle3d\paddle3d\models\base\base_model.py", line 132, in export
paddle.jit.save(self, path, input_spec=[self.input_spec])
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\wrapped_decorator.py", line 26, in impl
return wrapped_func(*args, **kwargs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\api.py", line 809, in wrapper func(layer, path, input_spec, **configs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\wrapped_decorator.py", line 26, in impl
return wrapped_func(*args, **kwargs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\dygraph\base.py", line 68, in impl
return func(*args, **kwargs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\api.py", line 1104, in save
static_func.concrete_program_specify_input_spec(
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py", line 986, in concrete_program_specify_input_spec
concrete_program, _ = self.get_concrete_program(
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py", line 875, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py", line 1648, in getitem
self._caches[item_id] = self._build_once(item)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py", line 1575, in _build_once
concrete_program = ConcreteProgram.from_func_spec(
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\wrapped_decorator.py", line 26, in impl
return wrapped_func(*args, **kwargs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\base\dygraph\base.py", line 68, in impl
return func(*args, **kwargs)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\program_translator.py", line 1346, in from_func_spec
error_data.raise_new_exception()
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\jit\dy2static\error.py", line 452, in raise_new_exception
raise new_exception from None
RuntimeError: In transformed code:

File "f:\paddlepaddle\paddle3d\paddle3d\models\base\base_model.py", line 67, in forward
    if self.in_export_mode:
File "f:\paddlepaddle\paddle3d\paddle3d\models\base\base_model.py", line 68, in forward
    return self.export_forward(samples, *args, **kwargs)
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars.py", line 153, in export_forward
    return self.head.post_process(samples, preds,
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 98, in post_process
    if getattr(self, "in_export_mode", False):
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 105, in post_process
    return paddle.static.nn.cond(
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 105, in post_process
    return paddle.static.nn.cond(
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 167, in _single_post_process
    return paddle.static.nn.cond(
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 167, in _single_post_process
    return paddle.static.nn.cond(
File "f:\paddlepaddle\paddle3d\paddle3d\models\detection\pointpillars\pointpillars_head.py", line 194, in _box_not_empty
    selected = rotate_nms_pcdet(
File "f:\paddlepaddle\paddle3d\paddle3d\models\layers\layer_libs.py", line 240, in rotate_nms_pcdet
    if paddle.is_compiled_with_xpu():
File "f:\paddlepaddle\paddle3d\paddle3d\models\layers\layer_libs.py", line 243, in rotate_nms_pcdet
        keep, num_out = iou3d_nms.nms_xpu(boxes, thresh)
    else:  # gpu
        keep, num_out = iou3d_nms.nms_gpu(boxes, thresh)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    selected = order[keep[:num_out]]

File "f:\paddlepaddle\paddle3d\paddle3d\ops\__init__.py", line 186, in __getattr__
    module = self._load_module()
File "f:\paddlepaddle\paddle3d\paddle3d\ops\__init__.py", line 172, in _load_module
    self.module = self.jit_build()
File "f:\paddlepaddle\paddle3d\paddle3d\ops\__init__.py", line 159, in jit_build
    return paddle_jit_load(
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\utils\cpp_extension\cpp_extension.py", line 939, in load
    _jit_compile(file_path, verbose)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py", line 1355, in _jit_compile
    run_cmd(compile_cmd, verbose)
File "C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py", line 1397, in run_cmd
    raise RuntimeError(f"Failed to run command: {compile}, errors: {error}")

RuntimeError: Failed to run command: <built-in function compile>, errors: Command 'cd /d C:\Users\jiby\.cache\paddle_extensions && C:\Users\jiby\AppData\Local\anaconda3\envs\paddle-env\python.exe iou3d_nms_setup.py build' returned non-zero exit status 1.

对应版本:
paddle3d 1.0.0
paddledet 0.0.0
paddlepaddle-gpu 2.6.1.post117
paddleseg 2.9.0
Python 3.10.14
NVIDIA-SMI 537.13 Driver Version: 537.13 CUDA Version: 12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants