goodspb / pdlib

PHP extension for Dlib.
MIT License
71 stars 19 forks source link

Illegal instruction (core dumped) using cuda docker #23

Open sabado opened 4 years ago

sabado commented 4 years ago

pdlib produces a Illegal instruction (core dumped) error message and terminate the execution of the php script. it happends when detect() method is called for CnnFaceDetection.

The stranger thing, when instantiate the class everything goes ok, and nvidia-smi shows a increment of memory usage.

dlib compiled into a nvidia cuda docker. python works well. Test passed and gpu used a gb or ram.

cmake -H/dlib -B/dlib/build -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug

pdlib compiled fine too. But Test fail trying to detect faces.

=====================================================================
TIME START 2020-04-28 08:14:47
=====================================================================
PASS Check for pdlib presence [tests/001.phpt] 
PASS Basic tests for chinese_whispers [tests/chinese_whispers_basic.phpt] 
PASS Edge given in edges array for chinese_whispers functions is associative array [tests/chinese_whispers_edge_associative_array_error.phpt] 
PASS Edge elements given in edges array for chinese_whispers functions are not of long type [tests/chinese_whispers_edge_elements_not_long.phpt] 
PASS Edge given in edges array for chinese_whispers functions is not having all values to be arrays with 2 elements [tests/chinese_whispers_edge_not_2_element_error.phpt] 
PASS Edge given in edges array is not array for chinese_whispers functions [tests/chinese_whispers_edge_not_array_error.phpt] 
PASS Args given to chinese_whispers functions is not correct [tests/chinese_whispers_wrong_arg_type_error.phpt] 
PASS Testing CnnFaceDetection constructor without arguments [tests/cnn_face_detection_ctor_error.phpt] 
PASS Testing CnnFaceDetection constructor with model that do not exist [tests/cnn_face_detection_ctor_model_not_found_error.phpt] 
PASS Testing FaceLandmarkDetection constructor without arguments [tests/face_landmark_detection_ctor_error.phpt] 
PASS Testing FaceRecognition constructor without arguments [tests/face_recognition_ctor_error.phpt] 
FAIL Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt] 

My script test


 ~ debug: models/mmod_human_face_detector.dat
 ~ Processing Input: input
 ~ Stored temporary file 0-1588030290.8421.jpg in images/0-1588030290.8421.jpg

 ! Generating 128D Descriptor 
   . Detecting  Illegal **instruction (core dumped)**

i also configured pdlib using --enable-debug flag, but the same Illegal instruction (core dumped) message appears :(