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

Fix examples #60

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Fix examples #60

merged 4 commits into from
Jan 10, 2025

Conversation

ishiy1993
Copy link
Contributor

python3.9以降ではexamplesの一部がエラーになっていたので修正する。

@ishiy1993
Copy link
Contributor Author

ishiy1993 commented Jan 9, 2025

bookworm 64bit:

(venv) pi@rpios-bookworm-20250107:~/py-videocore6 $ python3 examples/sgemm.py
==== sgemm example (1024x1024 times 1024x1024) ====
numpy: 0.2583 sec, 8.326 Gflop/s
QPU:   0.8022 sec, 2.681 Gflop/s
Minimum absolute error: 0.0
Maximum absolute error: 0.0003814697265625
Minimum relative error: 0.0
Maximum relative error: 0.13134673237800598
(venv) pi@rpios-bookworm-20250107:~/py-videocore6 $ python3 examples/summation.py
==== summaton example (32.0 Mi elements) ====
Preparing for buffers...
Executing on QPU...
0.04790381399999433 sec, 2801.817158024534 MB/s
(venv) pi@rpios-bookworm-20250107:~/py-videocore6 $ python3 examples/memset.py
==== memset example (64.0 MiB) ====
Preparing for buffers...
Executing on QPU...
0.028210215000001426 sec, 2378.885237138271 MB/s
(venv) pi@rpios-bookworm-20250107:~/py-videocore6 $ python3 examples/scopy.py
==== scopy example (16.0 Mi elements) ====
Preparing for buffers...
Executing on QPU...
0.04140828499998861 sec, 1620.6627248633565 MB/s

buster 32bit:

pi@actsim-buster-20250109:~/py-videocore6 $ PYTHONPATH=. python3 examples/sgemm.py
==== sgemm example (1024x1024 times 1024x1024) ====
numpy: 0.2217 sec, 9.701 Gflop/s
QPU:   0.59 sec, 3.645 Gflop/s
Minimum absolute error: 0.0
Maximum absolute error: 0.00040435791015625
Minimum relative error: 0.0
Maximum relative error: 0.16618169844150543
pi@actsim-buster-20250109:~/py-videocore6 $ PYTHONPATH=. python3 examples/summation.py
==== summaton example (32.0 Mi elements) ====
Preparing for buffers...
Executing on QPU...
examples/summation.py:177: RuntimeWarning: overflow encountered in long_scalars
  assert int(sum(Y.astype(int))) % 2**32 == (length - 1) * length // 2 % 2**32
0.01958620300000291 sec, 6852.667053434504 MB/s
pi@actsim-buster-20250109:~/py-videocore6 $ PYTHONPATH=. python3 examples/memset.py
==== memset example (64.0 MiB) ====
Preparing for buffers...
Executing on QPU...
0.0183182410000029 sec, 3663.4993501826607 MB/s
pi@actsim-buster-20250109:~/py-videocore6 $ PYTHONPATH=. python3 examples/scopy.py
==== scopy example (16.0 Mi elements) ====
Preparing for buffers...
Executing on QPU...
0.028704903999994258 sec, 2337.8884667237844 MB/s

@ishiy1993 ishiy1993 requested a review from eldesh January 9, 2025 06:32
@ishiy1993 ishiy1993 merged commit f14c853 into master Jan 10, 2025
1 check passed
@ishiy1993 ishiy1993 deleted the fix-examples branch January 10, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants