Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 itsisOptimized
parameter to compare the results and time needed between before and after optimizedTest 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