google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
422 stars 124 forks source link

Anyone successful using MPCI-e TPU on WIndows 10? #371

Open wb666greene opened 3 years ago

wb666greene commented 3 years ago

I've tried on three different systems. Software installation seems to go correctly but the Coral PCIe Accelerator Driver fails to start with error code 37 (wrong type)

If I plug in a USB3 TPU my code works correctly.

Two of these computers were dual boot Ubuntu 16.04 and Ubuntu 20.04 and the MPCI-e module works correctly on these so I don't see how it can be a motherboard hardware issue.

My knowledge of Windows 10 is limited as I got off the Windows bus at Windows 8. I ported my Python Code to Windows 10 for a friend (was really easy and why Python rocks!), since he has multiple systems he'd like to set up that all have MPCI-e slots, and the MPCI-e module is less than half the cost of the USB3 TPU, the motivation is obvious. I'd get him to switch to Linux if I could but the AI is just an add-on extra, everything else he runs is locked to Windows.

Please, I need a clue here.

mbrooksx commented 3 years ago

Hello @wb666greene,

I'm unable to reproduce the issues on Windows 10 but error 37 indicates to me that there is likely an issue with the device driver. When you open device manager, do you see Coral Accelerator Devices: Screenshot 2021-05-03 11 42 56 AM

My recommendation is to remove the driver and reinstall. You can determine the driver file by going to device manager and finding the device > properties > Inf name: Screenshot 2021-05-03 11 58 40 AM

With this in mind, first I'd run the uninstall.bat that is included in the edgetpu release. After that I'd make sure the inf file is removed by running pnputil

pnputil.exe /delete-driver oem##.inf /force

After that I'd make sure to install the latest package (https://coral.ai/software/#edgetpu-runtime) and make sure the Visual C++ redistributable is installed (see the instructions). Then you should reinstall the package and see if error code 37 persists.

wb666greene commented 3 years ago

Yes I see the Coral PCIe Accelerator in Device manager, but it has the yellow triangle with ! in the center.

My inf.name is oem18.inf, you show oem17.inf

I have installed edgetpu_runtime_20210119.zip

Assuming the oem1x.inf numbering is sequential, perhaps I should try an earlier version to get oem17.inf?

I ran the uninstall batch file as admin and rebooted. The Coral PCIe Accelerator still shows in Device Manager with the not working icon and Inf.name is still oem18.inf.

I opened a command window as admin and ran: pnputil.exe /delete-driver oem##.inf /force and rebooted again, and the Coral Accelerator is still there although Inf.name is now oem18.---

I tried installing the previous 20201204 version and the installation fails. [Edit] Doh! lools like I clicked uninstall.bat so I haven't actually tried the previous version.

Deleting edgetpu and libusb from System32
Could Not Find c:\windows\system32\edgetpu.dll
Could Not Find c:\windows\system32\libusb-1.0.dll
Unistalling WinUSB drivers
...
Press any key to continue . . .

So I tried re-installing the 20210119 version, seems to have run correctly:

Warning: During normal operation, the Edge TPU Accelerator may heat up,
depending on the computation workloads and operating frequency. Touching the
metal part of the device after it has been operating for an extended period of
time may lead to discomfort and/or skin burns. As such, when running at the
default operating frequency, the device is intended to safely operate at an
ambient temperature of 35C or less. Or when running at the maximum operating
frequency, it should be operated at an ambient temperature of 25C or less.

Google does not accept any responsibility for any loss or damage if the device
is operated outside of the recommended ambient temperature range.
................................................................................
Would you like to enable the maximum operating frequency for the USB Accelerator? Y/N y
Installing UsbDk
Installing Windows drivers
Microsoft PnP Utility

Adding driver package:  coral.inf
Driver package added successfully.
Published Name:         oem14.inf
Driver package installed on matching devices.

Adding driver package:  Coral_USB_Accelerator.inf
Driver package added successfully.
Published Name:         oem19.inf
Driver package installed on matching devices.

Adding driver package:  Coral_USB_Accelerator_(DFU).inf
Driver package added successfully.
Published Name:         oem20.inf
Driver package matches devices that already have their drivers up to date.

Total driver packages:  3
Added driver packages:  2
Installing performance counters

Info: Provider {aaa5bf9e-c44b-4177-af65-d3a06ba45fe7} defined in C:\Users\MINI PC\Favorites\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\MINI PC\Favorites\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
Press any key to continue . . .

But this time the Coral Accelerator in Device Manager still shows Error Code 37 but Inf.name now shows oem14.inf WTF? This kind of crap is why I quit Windows after Win7.

mbrooksx commented 3 years ago

Well I agree on quitting Windows - buit I want to verify, did you run "pnputil.exe /delete-driver oem##.inf /force " exactly or did you replace ## with the correct values? You'll want to remove all the drivers that are there (seemingly 14,17,18,19, and 20 now - although some should be gone when you run uninstall.bat again

wb666greene commented 3 years ago

OK I ran the uninstall.bat again, deleted the device and removed the drivers in device manager, and finally repeated the pnputil.exe /delete-driver oem##.inf /force command for ## --> 14 thru 20.

But "Scan for Hardware Changes" somehow still finds Coral Accelerator under PCI devices with oem14.inf and error code 37. I persisted with "Uninstall Device" in Device Manager until I finally got Device Manager to not show any Coral PCI Device, it just has Other Devices --> PCI Device after I do scan for hardware changes.

I've also deleted the downloaded zip files and unzipped directories . After rebooting I finally do not show Coral Accelerator in Device Manager.

I will download the edgetpu_runtime_20210119.zip and start over.

I'll post a follow up once I've gone thru it again.

I personally don't use Windows, but I removed the old WiFi module from a circa 2010 (no USB3) Thinkpad T410 (i5-540m) running Ubuntu Mate-20.04, installed the $25 MPCIe module, and my MobilenetSSDv2_coco person detector AI code running overnight gave ~25 fps which is pretty much the sum of the frame rates of the attached IP cameras. There are a lot of old laptops out there that could find new life adding AI "person detection" to existing security DVR/NVR systems with one of these Coral TPU modules. Putting Linux on them would be best, but that is a step too far for most people. This is my motivation for figuring out what is going wrong here.

wb666greene commented 3 years ago

Unzipped the freshly downloaded edgetpu_runtime.202101119.zip and ran the install.bat, got:

Would you like to enable the maximum operating frequency for the USB Accelerator? Y/N y
Installing UsbDk
Installing Windows drivers
Microsoft PnP Utility

Adding driver package:  coral.inf
Driver package added successfully.
Published Name:         oem14.inf
Driver package installed on matching devices.

Adding driver package:  Coral_USB_Accelerator.inf
Driver package added successfully.
Published Name:         oem15.inf
Driver package installed on matching devices.

Adding driver package:  Coral_USB_Accelerator_(DFU).inf
Driver package added successfully.
Published Name:         oem16.inf
Driver package installed on matching devices.

Total driver packages:  3
Added driver packages:  3
Installing performance counters

Info: Provider {aaa5bf9e-c44b-4177-af65-d3a06ba45fe7} defined in C:\Users\MINI PC\Favorites\Downloads\edgetpu_runtime\third_party\coral_accelerator_windows\coral.man is already installed in system repository.
Info: Successfully installed performance counters in C:\Users\MINI PC\Favorites\Downloads\edgetpu_runtime\third_party\coral_accelerator_windows\coral.manCopying edgetpu and libusb to System32
        1 file(s) copied.
        1 file(s) copied.
Install complete
Press any key to continue . . .

Device Manager still shows error code 37 :( Inf.name property shows oem14.inf Driver file details show C:\Windows\system32\DRIVERS\coral.sys Provider: Google LLC Driver Date: 1/8/2021 File Version: 13.8.9.820 Digital Signer: Microsoft Windows Hardware Compatibility

Any ideas as to what is wrong?

Should I purge again and try the previous version?

If I plug in a USB3 TPU my code runs correctly.

wb666greene commented 3 years ago

There is something wrong with uninstall.bat. When I tried to remove 20210119 I get:

Unable to uninstall driver package from devices: The specified file is not an installed OEM INF.
Uninstalling UsbDk
Uninstall complete
Press any key to continue . . .

I'm going to purge all these drivers and try the previous version. If that fails I'm done until maybe another version comes out.

wb666greene commented 3 years ago

I'm done. The Windows 10 support is garbage. Trying the previous 20201204 version install.bat I get:

Installing UsbDk
Installing Windows drivers
Microsoft PnP Utility

Adding driver package:  coral.inf
Driver package added successfully.
Published Name:         oem14.inf
Driver package installed on matching devices.

Adding driver package:  Coral_USB_Accelerator.inf
Failed to add driver package: The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.

Adding driver package:  Coral_USB_Accelerator_(DFU).inf
Failed to add driver package: The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.

Total driver packages:  3
Added driver packages:  1
Installing performance counters

Info: Provider {aaa5bf9e-c44b-4177-af65-d3a06ba45fe7} defined in C:\Users\MINI PC\Favorites\Downloads\edgetpu_runtime\third_party\coral_accelerator_windows\coral.man is already installed in system repository.
Info: Successfully installed performance counters in C:\Users\MINI PC\Favorites\Downloads\edgetpu_runtime\third_party\coral_accelerator_windows\coral.manCopying edgetpu and libusb to System32
        1 file(s) copied.
        1 file(s) copied.
Install complete
Press any key to continue . . .
kk02067 commented 1 month ago

I am having the same problem as everyone else, a yellow exclamation mark on the device.

But I maybe have found out what the problem is. When trying the coral PCIe in another computer it failed as before. I had other problems to take care of so I did som other stuff for a while. While trying to fix the other stuff I went into the bios and changed the m.2 slot from gen 3 to gen 2. And when I booted back into windows to check if the other problem was fixed I noticed that there was no exlamtionmark on the coral and the device worked. That got me looking att the specs for the chip and it seems to be a gen 2 chip. Can the problem be that the chip isn't compatible with gen 3 and up? And is it possible to change the rootport to be a gen 2 instead of gen 3 in my other computer.