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

Optimize GaussianProb #406

Merged
merged 3 commits into from
Jun 26, 2023
Merged

Optimize GaussianProb #406

merged 3 commits into from
Jun 26, 2023

Conversation

Routhleck
Copy link
Collaborator

@Routhleck Routhleck commented Jun 26, 2023

Description

Optimize GaussianProb with JAX and Create test_GaussianProb_opt.py to test its correction and optimization effect

How Has This Been Tested

Generate two connection matrix by calling build_mat function and change its isOptimized parameter to compare the results and time needed between before and after optimized

Test device

Hardware

  • CPU: Intel Core i5-1340P 8C16T(4P+8E)

  • GPU: Intel® Iris® Xe Graphics eligible(No CUDA)

  • RAM: 32G DDR4 3200MHz

Software

  • OS: Windows10 22H2

  • Python: 3.10

Below is the test report

============================= test session starts =============================
collecting ... collected 4 items

test_GaussianProb_opt.py::test_gaussian_prob1
test_GaussianProb_opt.py::test_gaussian_prob2
test_GaussianProb_opt.py::test_gaussian_prob3
test_GaussianProb_opt.py::test_gaussian_prob4

================== 4 passed, 1 warning in 134.70s (0:02:14) ===================
PASSED [ 25%]
time_optimized:0.040474891662597656
time_origin:0.16180109977722168
PASSED [ 50%]
time_optimized:1.0694525241851807
time_origin:7.487141132354736
PASSED [ 75%]
time_optimized:22.59926676750183
time_origin:52.102147579193115
PASSED [100%]
time_optimized:2.2735044956207275
time_origin:21.08591890335083

Types of changes

  • Refactoring (no functional changes, no api changes)

Optimize GaussianProb with JAX and Create test_GaussianProb_opt.py to test its correction and optimization effect
Below is the test report
============================= test session starts =============================
collecting ... collected 4 items

test_GaussianProb_opt.py::test_gaussian_prob1
test_GaussianProb_opt.py::test_gaussian_prob2
test_GaussianProb_opt.py::test_gaussian_prob3
test_GaussianProb_opt.py::test_gaussian_prob4

================== 4 passed, 1 warning in 134.70s (0:02:14) ===================
PASSED                     [ 25%]
time_optimized:0.040474891662597656
time_origin:0.16180109977722168
PASSED                     [ 50%]
time_optimized:1.0694525241851807
time_origin:7.487141132354736
PASSED                     [ 75%]
time_optimized:22.59926676750183
time_origin:52.102147579193115
PASSED                     [100%]
time_optimized:2.2735044956207275
time_origin:21.08591890335083

Process finished with exit code 0
@chaoming0625 chaoming0625 merged commit d5e7655 into brainpy:master Jun 26, 2023
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