LAUNCH ERROR Device not found #14577
-
Dear community, I'm trying out paddlex and I'm trying to run an example here: https://paddlepaddle.github.io/PaddleX/latest/en/practical_tutorials/ocr_det_license_tutorial.html#41-data-preparation I'm running it on mac m1 and I'm getting the following output after running Output:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The error Root Cause
Solution1. Run in CPU ModeSince your Mac M1 does not support CUDA GPUs, you need to explicitly run PaddlePaddle in CPU mode. Modify your command to disable GPU usage by setting the environment variable CUDA_VISIBLE_DEVICES="" python3 main.py -c paddlex/configs/text_detection/PP-OCRv4_server_det.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/ccpd_text_det This ensures that the training script will only utilize the CPU. 2. Install PaddlePaddle with M1 SupportPaddlePaddle does support the Apple M1 chip with the Metal backend. Ensure that you have installed the correct version of PaddlePaddle for your Mac M1. Use the following installation command: pip install paddlepaddle-mac -i https://mirror.baidu.com/pypi/simple This version is optimized for the M1 architecture and uses the Metal Performance Shaders (MPS) backend for GPU acceleration. 3. Avoid Distributed TrainingThe python3 tools/train.py -c paddlex/configs/text_detection/PP-OCRv4_server_det.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/ccpd_text_det This bypasses the distributed launch module and runs the training script directly. 4. Use Compatible PaddlePaddle ConfigurationsThe configuration file
Additional Notes
ReferencesIf the above steps do not resolve your issue, consider looking at related discussions or issues: You can also refer to the discussion linked earlier (Discussion #14069) if you encounter similar issues like By following these steps, you should be able to resolve the Response generated by feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
The error
LAUNCH ERROR Device not found
indicates that the PaddlePaddle framework is trying to use GPU devices (0,1,2,3
) that are not available or compatible with your system. Since you're running this on a Mac with an M1 chip, there are a few key points to address:Root Cause
GPU Devices Not Present: The error log shows that PaddlePaddle is attempting to use GPU devices (
0,1,2,3
), but your Mac M1 does not have discrete GPUs compatible with CUDA. Instead, it uses the Apple Metal framework for GPU acceleration, which is currently supported in PaddlePaddle only with specific configurations.Incorrect Launch Configuration: The training script is being executed in distributed training mo…