Coral mini pcie, will adapter work #5932
Replies: 14 comments 19 replies
-
Personally I would try a PCIe to mini-PCIe adapter if you have standard PCIe slots. Amazon lists several. I see Mouser has thousands of mini-PCIe Coral TPUs in stock so I expect this will be a popular question. |
Beta Was this translation helpful? Give feedback.
-
Ah, that is actually a good suggestion. Didn't think of that, but I do have an empty PCI Express x16 expansion slot, finding a PCIe to mini PCIe is probably a good solution. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your support. Will look into this as soon as I have the new HW |
Beta Was this translation helpful? Give feedback.
-
You’re trying to plug a mini-PCIe card directly into a full size PCIe slot. You need an adapter. Unfortunately it appears that the Ableconn PEX-MP117 adapter that was previously reported to work with Coral isn’t available (except I see one on Ebay).
I would probably try this one and return if it doesn’t work. It has a switch to control the power supply voltage for the mini card, the Coral needs 3.3 volts.
https://www.amazon.com/BQZYX-Mini-PCI-Express-Adapter/dp/B07ZKHWVQV
Or, you could try an M.2 adapter as you first suggested, but it needs to be the correct type for your motherboard’s M.2 slot. A/E or M, usually. This one is A/E slot:
https://www.amazon.com/Mini-PCI-NGFF-Adapter-Module/dp/B08B3WF67J
I suspect the reason Mouser has so many mini-PCIe TPUs is that it’s a 20 year old interface and not very popular. So options for using them are a bit limited.
Good luck!
On Apr 9, 2023, at 4:15 AM, Henke19822 ***@***.***> wrote:
Sorry, me again. I don't really get my head around this (actually, not that familiar with PCI Express, except the one time I connected a GPU to it).
Several discussion forums say that I should be able to connect my mini PCIe to a bigger lane, for instance a PCIe X4. But, that doesn't fit, the space in my card is too narrow.
[20230409_110605]<https://user-images.githubusercontent.com/48420440/230764682-055bd365-c540-41db-aac8-a302a2a28de9.jpg>
When I search Amazon for "PCIe to mini-PCIe adapter" I only get odd results, like M.2 adapters and stuff. Could you send me a link of one good item and I know what to look for (it can be x16 as well, the new HW should have that).
Thank you so much in advance
—
Reply to this email directly, view it on GitHub<#5932 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALWES74IR6WECLYUKKEDVC3XAJ43NANCNFSM6AAAAAAWXKZT6A>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just get an adapter from aliexpress or other marketplaces. Works like a charm. Just type "mini pcie adapter" |
Beta Was this translation helpful? Give feedback.
-
Wow, what awesome support. Deeply grateful. |
Beta Was this translation helpful? Give feedback.
-
I designed an adapter myself if anyone is interested - open source hardware. https://github.com/gcormier/minicoralbridge |
Beta Was this translation helpful? Give feedback.
-
Adding my experience trying to fit the M.2 Coral chip into my desktop PC (running UNRAID). Mini-PCIe to PCIe adapter was the correct route. I now have it up and running:
|
Beta Was this translation helpful? Give feedback.
-
FYI the makerfabs adapter works great and enables both of the TPUs on the dual TPU card. I had mine in a normal slot prior to getting it and was only able to use one of the TPUs, which had absolutely no impact on my life or ability to use Frigate but highly annoyed me, lol. So I got the adapter and was a bit nervous but it works perfectly. |
Beta Was this translation helpful? Give feedback.
-
Hi I have got the adapter and Coral TPU mini pice version, Can someone help me in setting up the drivers in Proxmox, I searched google a lot but it's confusing. I am trying to run Home assistant and Frigate in Docker and passthrough the Coral in a Proxmox server. Any help is much appreciated! Also this the adapter I got : https://www.amazon.com/gp/product/B07N2X62LQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 |
Beta Was this translation helpful? Give feedback.
-
I made these notes when I set up Home Assistant and Frigate on Proxmox a couple years ago. I used a KVM VM called VM 101, change to match your VM. The objective is to disable the apex driver on the Proxmox host so the guest can use the TPU. When I set this up I only had a single TPU. If you have a dual they should both show up in lspci. Edit /etc/modules on Proxmox host: Edit /etc/modprobe.d/pve-blacklist.conf on Proxmox host: Update initramfs and reboot the host: Check result: Turn on passthrough for VM 101 using pcie address of TPU. Get that from lspci: Create file to add intel_iommu=on boot parameter (or amd_iommu=on if appropriate for your CPU). VM WILL NOT BOOT with passthrough without IOMMU. Apply changes: Results: #lspci -nnk (in VM) shows apex driver being used: |
Beta Was this translation helpful? Give feedback.
-
Edge TPU on frigate on docker on virtual machine on True NAS core working :-)Here is my "journey" with minipci Coral :-) Below complete solution for the spec:
PCI -> miniPCI adapterFirst you need buy an adapter. It is only pin-mapping adapter + one 1v regulator. I've tryed two different from aliexpress (3-4 Euro each): link1, link2, they could be unavailable in future, the looks like this with mounted Coral TPU, both works perfect: Be extremely careful when connecting to PCI-e. The position in slot is different than you (probably) think! Longer part of adapter (with 11 gold pins) goes to shorter part of PCI-e slot, before "key". If you connect it in other way you short-cut and demage motherboard/card. True NAS CoreTrue NAS Core is based on FreeBSD, you need allow for pci throughput in virtual machine (Ubuntu) governed by bhyve. First, enable VT-d in a BIOS (Virtual Machine Manager - Virtualization Technology for Directed I/O) - this is Intel stuff, AMD has similar feature. After restart open True NAS console check if You see pci device, it should looks like:
or
Next, according to: https://www.bsdstore.ru/en/13.0.x/wf_bhyveppt_ssi.html and https://wiki.freebsd.org/bhyve/pci_passthru you need setup system variables, it is essential to pass-through device to virtual machine. Open System/Tunables in a True NAS and add the following variables:
The second variable depends on your PCI-e slot, check numbers in Create Virtual MachineAfter TrueNAS restart you can finally add PCI device to your VirtualMachine. Before the list with PCI devices was empty. Now it looks like: Virtual MachineAssume, you create virtual machine Ubuntu 22.04 (or similar), boot it, login,
You sould see Coral Edge TPU inside your Virtual Machine (Ubuntu)... Now you need to install all stuff related with TPU Coral, according to doc:
restart virtual machine and check for apex module:
and apex device:
frigate dockerAssume you are using frigate in a docker. My docker-compose.yml looks like:
I notice, some folks pass /dev/apex to the continer but i didn't and it works :-) It means you don't need any pci pass through inside virtual machine. Just start firgate docker and it will see coral TPU (two level of virtualization above ;-)). frigate TPUIn order to use TPU as a detector you have to configure
frigate logs:
final thoughtsIt was... difficult and annoying... All because True NAS core is based on FreeBSD. I recommend True NAS scale which is free as core but based on Linux. I didn't switch to scale because of many "jails" on core. The migration will be difficult for me but I plan it in future. On Linux based Free NAS this device it should work without all this difficult configuration. |
Beta Was this translation helpful? Give feedback.
-
I've finally got a setup on TrueNAS Scale working comfortably well. It's relatively easy to play around with the console and force TrueNAS to load the necessary Apex drivers, but future TrueNAS updates might just wipe those drivers out. I'm using one of the Magic Blue Smoke adapters and a dual edge TPU. With an 8 camera setup, I'm getting 6.5ms inference times. |
Beta Was this translation helpful? Give feedback.
-
Yes thanks, that's what I've done also so far. My OS can see 2x TPUs under
lspci.
But I'm not home so can't check which specific chart I used. I had posted
my chart link on the GitHub site.
I plan on getting back in 2 days and to get the chart you mentioned.
Thanks & Regards
Ash
…On Sat, Dec 30, 2023, 6:28 PM Douglas Lorenz ***@***.***> wrote:
The method I used to install a Coral dual TPU and Frigate on TrueNAS Scale
is a bit sketchy. The Coral drivers, aka "Apex" drivers need to be
installed in the OS. The directions to do this on a regular linux
installation are here:
https://coral.ai/docs/m2/get-started/#2a-on-linux
The developers of TrueNAS don't want you to be able to do this, so they
have disabled the APT command. To re-enable APT:
chmod +x /usr/bin/apt*
This has worked for me, but there is a major concern. If you ever update
your TrueNAS Scale OS, it will likely erase these changes.
—
Reply to this email directly, view it on GitHub
<#5932 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXX6RJMANCJVU3RZFD3MZPTYMCPTDAVCNFSM6AAAAAAWXKZT6CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSOBQHE2TG>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I need to switch HW for my Home Assistant installation, and not many HWs offer mini pcie, which is the version I use for my Google Coral.
A lot of HWs offer M.2 instead, would it be possible to use a M.2 to mini PCIe adapter, or even a USB to mini PCIe adapter? Or would this fail?
Beta Was this translation helpful? Give feedback.
All reactions