question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad precision and warnings when running under Raspberry PI 3

See original GitHub issue

This project is really promising. Too bad there is no documentation and very few examples 😃.

I was trying some examples and I see this:

root@osmcpi:/home/jcea/virtualenv/py-videocore/examples# ../../bin/python sgemm.py 
sgemm.py:655: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  uniforms[th, 4] = A.addresses()[i*16*h, 0]
sgemm.py:656: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  uniforms[th, 5] = B.addresses()[0, j*64*w]
sgemm.py:657: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  uniforms[th, 6] = C.addresses()[i*16*h, j*64*w]
==== sgemm example (96x363 times 363x3072) ====
threads: 12
numpy: 31.9355 sec, 0.0067 Gflops
GPU: 0.0321 sec, 6.7054 Gflops
maximum absolute error: 7.3559e+01

root@osmcpi:/home/jcea/virtualenv/py-videocore/examples# ../../bin/python sgemm_1thread.py 
==== sgemm example (96x363 times 363x3072) ====
threads: 1
numpy: 31.5038 sec, 0.0068 Gflops
GPU: 0.2676 sec, 0.8034 Gflops
maximum absolute error: 7.8866e+01

The virtualenv I am using runs Python 3.4.

The Raspberry PI 3 is running KODI at the same time, but not reproducing a video, just in the main menu.

“Hello world” example works fine, with maximum error ~1e-7.

Maybe this is useful:

root@osmcpi:/home/jcea/virtualenv/py-videocore/examples# ../../bin/python mailbox.py 
firmware revision: 57bc72be
board model: 0
board revision: a02082
board serial: 000000008a498dfc

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
jceacommented, Feb 19, 2018

Yes, I now get this:

==== sgemm example (96x363 times 363x3072) ====
threads: 12
numpy: 38.8727 sec, 0.0055 Gflops
GPU: 0.0282 sec, 7.6141 Gflops
minimum absolute error: 0.0000e+00
maximum absolute error: 9.1553e-04
minimum relative error: 0.0000e+00
maximum relative error: 1.0522e+01

I close the issue. Thanks.

PS: The NUMPY speed is a bit crappy because I have KODI running at the same time! 😃.

2reactions
patrickmscommented, Nov 26, 2017

On a Raspberry Pi 2 at least, the issue seems to be caused by the (default) disabling of the L2 cache.

Adding disable_l2cache=0 to /boot/config.txt (as well as commenting out dtoverlay=vc4-kms-v3d) and rebooting the Pi solved the problem for me.

See also https://raspberrypi.stackexchange.com/questions/36960/why-is-the-l2-cache-disabled-by-default-on-raspbian-jessie#36967

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with the Low Voltage Warning on the Raspberry Pi
This guide will show you how to identify and deal with the low voltage warning on a Raspberry Pi. Under-voltage can cause issues...
Read more >
Raspberry Pi 3B Under Voltage Warning
The above thread mentions that the pi is fine if the supply voltage is above 4.6V and also that the ranges are due...
Read more >
Undervoltage warning despite decent power supply
Thin and long cables result in high voltage drops over the cable because of the high current. In my case, this caused the...
Read more >
PCB Mods Silence Voltage Warnings On The Pi 4 - Hackaday
When it pops up on the corner of the screen, it's a warning that the input voltage is dipping into the danger zone....
Read more >
Raspberry Pi 3 Overclocking - JackenHack
I managed to run the Raspberry Pi 3 at 1.5 GHz but decided not to overdo it. I compromised and settled on a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found