Author Topic: Google Coral M.2 on non-x86 GNU/Linux SBC  (Read 2970 times)

0 Members and 3 Guests are viewing this topic.

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Google Coral M.2 on non-x86 GNU/Linux SBC
« on: April 01, 2023, 04:32:16 pm »
The Google coral M.2 Accelerator is a small ASIC designed by Google that accelerates Tensor Flow Lite models in a power efficient manner.

It's available in an M.2 module/E-key that includes two Edge TPU ML accelerators, each with their own PCIe Gen2 x1 interface.

- - -

anyone?
any experience?

- - -

tempted to buy one for my new MIPS/EL SBC  :o :o :o
« Last Edit: April 02, 2023, 06:24:18 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #1 on: April 01, 2023, 04:58:12 pm »
Some Python examples, here (get started)
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #2 on: April 03, 2023, 08:52:35 am »
Required software components? here more information on building libraries, misc and kernel drivers, to run inference on the Edge TPU

Hardware, any constraints? Sure, being a strong interrupt driven co-processor, whichever SBC you choose, MSI-X is required by the Edge TPU Silicon Engine over PCIe, otherwise without it there's no way to get interrupts and therefore no way to know when operations have completed.

I see, 64 bit is also required as a hard constraint - won't this work on a MIPS32? Do you need MIPS64?  :o :o :o
(I think it has to do with large buffers allocated on the stack)
« Last Edit: April 04, 2023, 11:26:55 am by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15257
  • Country: fr
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #3 on: April 03, 2023, 08:43:02 pm »
What do you want to do with it?
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #4 on: April 04, 2023, 11:28:32 am »
world domination .... something  ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15257
  • Country: fr
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #5 on: April 04, 2023, 06:44:57 pm »
world domination .... something  ;D

Good luck, you have a lot of competition out there already. :-DD
 
The following users thanked this post: DiTBho

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #6 on: April 05, 2023, 11:11:11 am »
world domination .... something  ;D

Good luck, you have a lot of competition out there already. :-DD



yeah, already too many people laugh, you have to exercise to laugh louder  :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #7 on: April 05, 2023, 11:29:55 am »
first crazy app: Imagine having your super secret router inside a full metal case in your camping tent, at a hacker camp meeting - do you really believe that your router disk is securely protected by an internal contact button as simple "tamper proof sensor?

Do you think it is better secured with a bicycle chain lock?
Do you feel it is better secured with 5 Kg of locks?

last time in the nearby tent they showed how to open all kinds of locks

TPUs rely on computer vision and visual deep learning at the edge, so your router can actually "see" who (a human being, but not you!!!) is looking around its metal case and run defensive algorithms(1)  :o :o :o :o


(1) send me a message on my Smartphone "Mayday Mayday, this is your router talking, stop hitting on the cos-player girl dressed as TombRider or Trinity or Captain Marvel (input from your taste profile) and get right back to the tent before the hackers crack my rootfs with tons of Trojan horses and all kind of root*hit !!!"



Planned for: next summer!
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15257
  • Country: fr
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #8 on: April 05, 2023, 06:59:30 pm »
world domination .... something  ;D

Good luck, you have a lot of competition out there already. :-DD



yeah, already too many people laugh, you have to exercise to laugh louder  :o :o :o

I would have posted a video about a real event rather than fictional to illustrate the point, but that probably wouldn't please moderation.
 ::)
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15257
  • Country: fr
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #9 on: April 05, 2023, 07:00:20 pm »
first crazy app: Imagine having your super secret router inside a full metal case in your camping tent, at a hacker camp meeting - do you really believe that your router disk is securely protected by an internal contact button as simple "tamper proof sensor?

Do you think it is better secured with a bicycle chain lock?
Do you feel it is better secured with 5 Kg of locks?

last time in the nearby tent they showed how to open all kinds of locks

TPUs rely on computer vision and visual deep learning at the edge, so your router can actually "see" who (a human being, but not you!!!) is looking around its metal case and run defensive algorithms(1)  :o :o :o :o


(1) send me a message on my Smartphone "Mayday Mayday, this is your router talking, stop hitting on the cos-player girl dressed as TombRider or Trinity or Captain Marvel (input from your taste profile) and get right back to the tent before the hackers crack my rootfs with tons of Trojan horses and all kind of root*hit !!!"



Planned for: next summer!

OK. :-DD
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #10 on: April 05, 2023, 09:47:46 pm »
I would have posted a video about a real event

I don't have a video handy yet, but I'll probably record something.

Anyway, aside from the *playful aspect*, these things are made for catching bugs.

For example, two years ago, no one had noticed a terrifying bug on the PCI of a Linux/MIPS router until I had the sick idea of trying to get some weird PCI card to work.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #11 on: April 08, 2023, 12:06:40 pm »
Quote
MSI-X is required by the Edge TPU Silicon Engine over PCIe, otherwise without it there's no way to get interrupts and therefore no way to know when operations have completed.

While it's usually easy with x86-SBC, with MIPS and PowerPC SBC it's not easy to tell immediately if it's supported or not.

For MikroTik's hw things, Yesterday I opened a Ticket to speak directly with someone :-//
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4458
  • Country: nz
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #12 on: April 08, 2023, 01:07:33 pm »
Note the "not supported" and "doesn't work" are very different things.

Quite a few Arm and RISC-V SBCs have M.2 but it's usually M-key for SSDs. Some have an E-key for Wifi/BT, but the ones I've looked at only have 1 PCIe lane to them and the Coral needs 2.
 
The following users thanked this post: DiTBho

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #13 on: April 08, 2023, 01:37:39 pm »
Good point.
Which restricts the usable set.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #14 on: April 08, 2023, 01:44:52 pm »
Note the "not supported" and "doesn't work" are very different things.

With bug-fixing(2) I meant - doesn't work *even* if it's supposed(1) supported(3).

(1) because so declared by its documentation
(2) the most shocking discovery happened with the RSP, since the first bug was the documentation: it said nothing except "PCI 2.1 compliant", so I assumed "full PCI compliant" whereas it was rather "only partially implemented", and that's the annoying part with a lot of SBCs around and modern technology.
(3) with the latest router the documentation didn't say you have to "clear a bit in the controller" before issuing a PCI request, so the SBC was randomly pushing junk into memory with a probability of one in every million IOp  of disaster - > took weeks to figure out what was wrong
« Last Edit: April 08, 2023, 01:49:48 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #15 on: April 08, 2023, 06:59:56 pm »
There are three version of Google Coral accelerators for SBC

B+M is confusing, since

Key B = sATA
Key M = PCIe x2
Key B+M = sATA or PCIe

so why key B?!?

also, the datasheet says
Quote
Features
Google Edge TPU ML accelerator
...
PCIe Gen2 x1 interface

so, is it 1 lane?!?  :o :o :o
« Last Edit: April 08, 2023, 07:03:45 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #16 on: April 08, 2023, 07:02:37 pm »
Key A = PCIe x2 and/or USB
Key E = PCIe x2 and/or USB
Key A + E = PCIe x2 and/or USB, but it depends on the internal wiring of the motherboard


=> more confusing => to be avoided if it's possible!
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline MrMobodies

  • Super Contributor
  • ***
  • Posts: 1958
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #17 on: April 08, 2023, 07:18:43 pm »
https://coral.ai/static/files/Coral-M2-datasheet.pdf
Quote
This on-device ML processing reduces latency, increases data privacy, and removes the need for a constant
internet connection
  :-+

Excellent.
Looks to me like a nice little toy to play with.
 
The following users thanked this post: DiTBho

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #18 on: April 16, 2023, 08:58:50 am »
so, after a lot of personal research, most non-x86 SBCs don't have MSI support over PCIe

it's really frustrating, datasheets don't even mention any detail about the PCIe.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15257
  • Country: fr
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #19 on: April 16, 2023, 07:28:35 pm »
Can it implement GPT-4 though? ;D
 
The following users thanked this post: DiTBho

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27861
  • Country: nl
    • NCT Developments
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #20 on: April 16, 2023, 09:57:54 pm »
The Google coral M.2 Accelerator is a small ASIC designed by Google that accelerates Tensor Flow Lite models in a power efficient manner.

It's available in an M.2 module/E-key that includes two Edge TPU ML accelerators, each with their own PCIe Gen2 x1 interface.
anyone?
any experience?
This works just fine on Arm64 platforms.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #21 on: April 17, 2023, 12:25:51 am »
This works just fine on Arm64 platforms.

64bit arm  :o :o :o :o

which SBC? with m.2? with miniPCIe?

The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3881
  • Country: us
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #22 on: April 17, 2023, 02:31:34 am »
so, after a lot of personal research, most non-x86 SBCs don't have MSI support over PCIe

Really? How does that even work?
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #23 on: April 17, 2023, 12:05:42 pm »
Really? How does that even work?

works but without MSI support.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3881
  • Country: us
Re: Google Coral M.2 on non-x86 GNU/Linux SBC
« Reply #24 on: April 17, 2023, 08:04:20 pm »
Really? How does that even work?

works but without MSI support.

My point was: MSI(-X) is the only way to do interrupts on PCIe.  There are PCI interrupt emulation messages, but it's all MSI based.  So either that means it has no interrupts at all, or it means something different than what I understand.  It's hard for me to see how a PCIe bus that doesn't support interrupts either meaningfully implements PCIe or supports much of anything.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf