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

Compatibility on NPU? #66

Open
truthstriver opened this issue Dec 26, 2024 · 1 comment
Open

Compatibility on NPU? #66

truthstriver opened this issue Dec 26, 2024 · 1 comment

Comments

@truthstriver
Copy link

Is APE compatible with NPU?

I'm using torch 2.1.0 and torch-npu 2.1.0 with all packages in requirements installed.
On a 910B3 x 8 device.

uname -a
Linux localhost.localdomain 5.10.0-136.12.0.86.h1032.eulerosv2r12.aarch64 #1 SMP Wed Jun 28 18:34:50 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

When I run python demo/ape_service.py, I encountered error below:

Traceback (most recent call last):
  File "/home/code/Video-RAG-master/APE-main/demo/ape_service.py", line 36, in <module>
    main()
  File "/home/code/Video-RAG-master/APE-main/demo/ape_service.py", line 8, in main
    demo = VisualizationDemo(cfg, args=None)
  File "/home/code/Video-RAG-master/APE-main/demo/predictor_lazy.py", line 177, in __init__
    self.predictor = DefaultPredictor(cfg)
  File "/home/code/Video-RAG-master/APE-main/ape/engine/defaults.py", line 190, in __init__
    self.model.to("npu")
  File "/home/ma-user/anaconda3/envs/llava/lib/python3.10/site-packages/torch_npu/utils/module.py", line 60, in to
    self.cast_weight(device)
  File "/home/ma-user/anaconda3/envs/llava/lib/python3.10/site-packages/torch_npu/utils/module.py", line 119, in cast_weight
    _format_cast(self, current_class)
  File "/home/ma-user/anaconda3/envs/llava/lib/python3.10/site-packages/torch_npu/utils/module.py", line 86, in _format_cast
    if torch.npu.is_jit_compile_false():
  File "/home/ma-user/anaconda3/envs/llava/lib/python3.10/site-packages/torch_npu/npu/npu_config.py", line 120, in is_jit_compile_false
    torch_npu.npu._lazy_init()
  File "/home/ma-user/anaconda3/envs/llava/lib/python3.10/site-packages/torch_npu/npu/__init__.py", line 203, in _lazy_init
    torch_npu._C._npu_init()
RuntimeError: Failed to set compile option ACL_OP_COMPILER_CACHE_MODE, result = 500001, set value enable
@shenyunhang
Copy link
Owner

The error seems to be caused by an NPU environment problem.

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