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

Issue with Mini PCIe Driver, Coral is not detected. #437

Closed
ibrahimsoliman97 opened this issue Aug 9, 2021 · 25 comments
Closed

Issue with Mini PCIe Driver, Coral is not detected. #437

ibrahimsoliman97 opened this issue Aug 9, 2021 · 25 comments
Assignees
Labels
comp:demo Demo related isssues Hardware:Mini PCIe Coral Mini PCIe Accelerator issues subtype:windows Windos Build/installation issues type:build/install Build and install issues

Comments

@ibrahimsoliman97
Copy link

I am currently testing Google Coral Mini PCIe Accelerator on Windows 10 x64.
I am facing an issue with the driver, I have followed this guide , but the the coral is not detected in the device manager neither can be detected when running any inference script.

I have tried uninstalling the drivers and install them back. but the problem still exist. I tried below drivers versions:
image

Could anyone provide advice for this issue?

@manoj7410
Copy link

@ibrahimsoliman97 Which machine are you working with ? Does your PCIe port support devices other than wifi/SSD moudles ?

@hjonnala hjonnala self-assigned this Aug 9, 2021
@hjonnala hjonnala added comp:demo Demo related isssues Hardware:Mini PCIe Coral Mini PCIe Accelerator issues subtype:windows Windos Build/installation issues type:support Support question or issue labels Aug 9, 2021
@hjonnala
Copy link
Contributor

hjonnala commented Aug 9, 2021

@ibrahimsoliman97 have you tried with edgetpu_runtime_20210119.zip?
can you please paste the command you are trying to execute and the error.

@hjonnala hjonnala added type:build/install Build and install issues and removed type:support Support question or issue labels Aug 9, 2021
@ibrahimsoliman97
Copy link
Author

@hjonnala Yes, I have tried this runtime version edgetpu_runtime_20210119.zip.

I execute following command:
python examples/classify_image.py --model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels test_data/inat_bird_labels.txt --input test_data/parrot.jpg

and I am getting following error:
ValueError: Failed to load delegate from edgetpu.dll

I am sure the python can detect and link with the dll correctly, because I am getting success from below command and can get the version correctly.
python -c "from ctypes import *; cdll.LoadLibrary('edgetpu.dll'); print('success')"
print(tflite_runtime.__git_version__)

@ibrahimsoliman97
Copy link
Author

@manoj7410 I will try to confirm this by today, by trying an ubuntu installation.

@ibrahimsoliman97
Copy link
Author

@manoj7410
Ubuntu also cannot detect the coral. I will rename the issue after this.
let me report all the information that you may need.
My device is Dell OptiPlex 5080, i am using the WiFi PCIe slot.
uname -r : 5.11.0-25-generic
lscpu, lspci --vvv, dmesg outputs are attached..
dmesg.txt
lscpu.txt
lspci.txt

@ibrahimsoliman97 ibrahimsoliman97 changed the title Issue with Mini PCIe Driver on Windows 10. Issue with Mini PCIe Driver, Coral is not detected. Aug 10, 2021
@manoj7410
Copy link

@ibrahimsoliman97 I have faced the same issue in the past with Dell OptiPlex 3060 / 9020. both the models were not able to detect the Coral PCIe device. I don't see any Coral entry in your machine's logs too.

@ibrahimsoliman97
Copy link
Author

@manoj7410 We have also tested with Dell OPTIPLEX XE3, Also got the same issue. The specifications confirm M.2 PCIe NVMe.
So what is the exact problem with all these Dell PCs?

@hjonnala
Copy link
Contributor

hjonnala commented Aug 11, 2021

@ibrahimsoliman97 do you have USB accelerator? If yes, can you please try with that to check if any issue with runtime?

Also, please paste the installation log for edgetpu_runtime_20210119.zip. and output of following command:

python3 -c 'from pycoral.utils.edgetpu import get_runtime_version; print(get_runtime_version())'

@jatinsha
Copy link

jatinsha commented Aug 11, 2021

I am also getting the same error on x64 WIndows 10 device.

$ python3 examples/classify_image.py --model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels test_data/inat_bird_labels.txt --input test_data/parrot.jpg

Traceback (most recent call last):
  File "examples\classify_image.py", line 121, in <module>
    main()
  File "examples\classify_image.py", line 71, in main
    interpreter = make_interpreter(*args.model.split('@'))
  File "Python39\site-packages\pycoral\utils\edgetpu.py", line 87
, in make_interpreter
    delegates = [load_edgetpu_delegate({'device': device} if device else {})]
  File "Python39\site-packages\pycoral\utils\edgetpu.py", line 52
, in load_edgetpu_delegate
    return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {})
  File "Python39\site-packages\tflite_runtime\interpreter.py", li
ne 162, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from edgetpu.dll

I was able to install the edgetpu driver successfully. Here are some diagnostic steps that I tried-

$ python3 -c 'from pycoral.utils.edgetpu import get_runtime_version; print(get_runtime_version())'
BuildLabel(COMPILER=MSVC 192528612,DATE=Jul 20 2021,TIME=14:30:22), RuntimeVersion(14)

$ python3 -c "from ctypes import *; cdll.LoadLibrary('edgetpu.dll'); print('success')"
success

$ python3 -c "import tflite_runtime; print(tflite_runtime.__git_version__)"
a4dfb8d1a71385bd6d122e4f27f86dcebb96712d

@hjonnala
Copy link
Contributor

@jatinsha edgetpu runtime 14 is not working on windows 10. Which coral device are you using?

Please try with edgetpu_runtime_20210119.zip from https://coral.ai/software/#edgetpu-runtime

@jatinsha
Copy link

@hjonnala : This worked. Thank you so much. I have the Coral USB Accelerator and I was following the official documentation (https://www.coral.ai/docs/accelerator/get-started#runtime-on-windows) to get it working on Windows. But definitely switching to Runtime 13 resolved the issue.

@ibrahimsoliman97
Copy link
Author

@hjonnala I don't have a USB Stick. I only have 3 M.2 Dual Coral cards.
Installation output of edgetpu_runtime_20210119:

Installing UsbDk
Installing Windows drivers
Microsoft PnP Utility                                                                                                                                                                                                                           Adding driver package:  coral.inf
Driver package added successfully.
Published Name:         oem99.inf
Adding driver package:  Coral_USB_Accelerator.inf
Driver package added successfully.
Published Name:         oem142.inf
Adding driver package:  Coral_USB_Accelerator_(DFU).inf
Driver package added successfully.
Published Name:         oem143.inf
Total driver packages:  3
Added driver packages:  3
Installing performance counters                                                                                                                                                                                                                 Info: Provider {aaa5bf9e-c44b-4177-af65-d3a06ba45fe7} defined in C:\Users\owner\Downloads\edgetpu_runtime_20210119\edgetpu_runtime\third_party\coral_accelerator_windows\coral.man is already installed in system repository.
Info: Successfully installed performance counters in C:\Users\owner\Downloads\edgetpu_runtime_20210119\edgetpu_runtime\third_party\coral_accelerator_windows\coral.manCopying edgetpu and libusb to System32
1 file(s) copied.
1 file(s) copied.
Install complete         
python -c 'from pycoral.utils.edgetpu import get_runtime_version; print(get_runtime_version())'
BuildLabel(COMPILER=MSVC 192628805,DATE=Nov  4 2020,TIME=11:05:43), RuntimeVersion(13)

python -c "from ctypes import *; cdll.LoadLibrary('edgetpu.dll'); print('success')"
success

python -c "import tflite_runtime; print(tflite_runtime.__git_version__)"
a4dfb8d1a71385bd6d122e4f27f86dcebb96712d 

@jatinsha
Copy link

jatinsha commented Aug 12, 2021 via email

@ibrahimsoliman97
Copy link
Author

@manoj7410 @hjonnala Did you test the coral m.2 with Nvidia Jetson TX2.
I am not able to get it working with TX2 (ubuntu 18.04) as well. The TX2 has M.2 Key E. but lspci shows nothing.
From different issues i can see that it can detect single coral chip with Jetson Nano. But i only have TX2.
My question is, how to know if the m.2 coral will work with a certain hardware or not since it seems not following the pcie standard or there is something that i don't understand?

dmesg.txt
lspci nothing

lscpu

Architecture:         aarch64
Byte Order:           Little Endian
CPU(s):               6
On-line CPU(s) list:  0,3-5
Off-line CPU(s) list: 1,2
Thread(s) per core:   1
Core(s) per socket:   4
Socket(s):            1
Vendor ID:            ARM
Model:                3
Model name:           Cortex-A57
Stepping:             r1p3
CPU max MHz:          2035.2000
CPU min MHz:          345.6000
BogoMIPS:             62.50
L1d cache:            32K
L1i cache:            48K
L2 cache:             2048K
Flags:                fp asimd evtstrm aes pmull sha1 sha2 crc32

@manoj7410
Copy link

@ibrahimsoliman97 M.2 (Not M.2 Dual) has been tested with Jetson Nano. Please see this thread #256 (comment) to see the compatible hardware.

M.2 Dual has been tested with https://www.nexcomusa.com/Products/multi-media-solutions/digital-signage-player/high-performance-player/digital-signage-player-ndis-b537

I haven't yet tried Jetson TX2 though.

For M.2 Dual, you should see two instances of the Device ID 089a in the output of 'lspci -vvv'.

@ibrahimsoliman97
Copy link
Author

@manoj7410 Why does it work with the tested hardware mentioned in your link and not with my hardware here? How can we expect a thing like this, where we need to test it with every hardware in our production even when it has a standard M.2 Slot?

@manoj7410
Copy link

@ibrahimsoliman97 In some hardware the M.2 slot is just an SSD slot or a Wifi slot and not an A+E key slot. Moreover, to run the Dual Accelerator, the PCIe slot should support two instances of PCIe. Can you confirm if you have 2 x1 pcie on your host ?

@ibrahimsoliman97
Copy link
Author

@manoj7410 According to Dell OptiPlex 5080 specifications, it has a 1 M.2 2230 slot which i am using.
For Jetson TX2 : it has a M.2 Key E, PCI-E x4.
For OPTIPLEX XE3: M.2 PCIe NVMe Class.

So we shouldn't expect it to work with any of these devices? Do you need any other debugging information that may help ?

@hjonnala
Copy link
Contributor

@ibrahimsoliman97 Can you see any Coral Accelerator Devices in Device Tree (Device Manager).

Can you please run this script and share the ouptut.

  • connecting to the coral device
  • not connecting to the coral device

@ibrahimsoliman97
Copy link
Author

@hjonnala No coral devices appear at Device Manager.

The script print nothing on both cases (connected or not connected).

@ibrahimsoliman97
Copy link
Author

@manoj7410 @hjonnala We are planning to buy a new PC to test the dual coral m.2, could you please advice what are the exact requirements that i should be looking for M.2 slot? should it be M.2 Key E only? or there are any other requirements?

@hjonnala
Copy link
Contributor

@ibrahimsoliman97 PC needs to have M2 with A, E, B or M key and Standard PCIE lane.

As a note, the port should be able to instantiate two instances of the PCIe device. Which means there should be two devices with the device ID 089a in lspci -vvv

@hjonnala
Copy link
Contributor

Hi @ibrahimsoliman97 are you able to test the dual coral m.2 with new PC?

@hjonnala
Copy link
Contributor

hjonnala commented Nov 1, 2021

Closing due to inactivity. Please feel free to reopen if you still have any questions. Thanks!

@hjonnala hjonnala closed this as completed Nov 1, 2021
@google-coral-bot
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:demo Demo related isssues Hardware:Mini PCIe Coral Mini PCIe Accelerator issues subtype:windows Windos Build/installation issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

4 participants