onemkl_gemv example expanded: iterative linear solver example working#821
Merged
oleksandr-pavlyk merged 11 commits intomasterfrom Apr 28, 2022
Merged
onemkl_gemv example expanded: iterative linear solver example working#821oleksandr-pavlyk merged 11 commits intomasterfrom
oleksandr-pavlyk merged 11 commits intomasterfrom
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/821/index.html |
Collaborator
Contributor
Author
|
I think this PR completes #749 |
The header and routines defined there are also used in standalone_cpp
target built from cpp/main.cpp
```
(idp_2022) [08:27:56 ansatnuc04 onemkl_gemv]$ $(find . -name cmake-build)/standalone_cpp 1000 11
Solving 1000 by 1000 diagonal system with rank-11 perturbation.
Converged in : 11 , 11 , 11 , 11 , 11 , 11 ,
Wall-clock cg_solve execution times: 683.416 , 408.391 , 411.849 , 412.661 , 412.317 , 412.658 ,
Redisual norm squared: 9.15541e-25
(idp_2022) [08:28:20 ansatnuc04 onemkl_gemv]$ python sycl_timing_solver.py 1000 11
Solving 1000 by 1000 diagonal linear system with rank 11 perturbation.
Name Intel(R) UHD Graphics [0x9bca]
Driver version 1.3.22992
Vendor Intel(R) Corporation
Profile FULL_PROFILE
Filter string level_zero:gpu:0
Using not in-order queue
0 (host_dt, device_dt)= (1156.8981241434813, 404.2941620000001)
1 (host_dt, device_dt)= (422.38221131265163, 404.5959500000001)
2 (host_dt, device_dt)= (423.1058154255152, 404.4037220000001)
3 (host_dt, device_dt)= (422.79740050435066, 403.78802800000005)
4 (host_dt, device_dt)= (424.4473725557327, 404.0881560000001)
5 (host_dt, device_dt)= (425.1241758465767, 404.55793600000004)
Converged in: [11, 11, 11, 11, 11, 11]
Python solution residual norm squared: 3.5289368114384933e-25
```
README is also expanded.
Expose cpp_cg_solve used in standalone_cpp executable from Python.
Invoked that from Python script sycl_timing_solver.py
```bash
$ python sycl_timing_solver.py 1000 11
Solving 1000 by 1000 diagonal linear system with rank 11 perturbation.
Name Intel(R) UHD Graphics [0x9bca]
Driver version 1.3.22992
Vendor Intel(R) Corporation
Profile FULL_PROFILE
Filter string level_zero:gpu:0
Using not in-order queue
0 (host_dt, device_dt)= (1157.4030127376318, 403.9605020000001)
1 (host_dt, device_dt)= (421.32044583559036, 403.45619400000004)
2 (host_dt, device_dt)= (420.66121101379395, 402.57058400000005)
3 (host_dt, device_dt)= (421.5433243662119, 402.9254920000001)
4 (host_dt, device_dt)= (421.9988752156496, 402.8818340000001)
5 (host_dt, device_dt)= (422.3589450120926, 402.63814600000006)
Converged in: [11, 11, 11, 11, 11, 11]
Python solution residual norm squared: 3.2839902926527995e-25
0 (host_dt, device_dt)= (412.9443597048521, 403.6290000000001)
1 (host_dt, device_dt)= (413.7023724615574, 403.8434720000001)
2 (host_dt, device_dt)= (413.4188834577799, 403.1985620000001)
3 (host_dt, device_dt)= (413.85203413665295, 402.70404800000006)
4 (host_dt, device_dt)= (416.2806496024132, 404.0513040000001)
5 (host_dt, device_dt)= (417.43320040404797, 404.74999800000006)
Converged in: [11, 11, 11, 11, 11, 11]
cpp_cg_solve solution residual norm squared: 3.218393087932091e-25
```
281bbc2 to
fc7041e
Compare
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is the example with Chebyshev solver and conjugate gradient descent solver based on oneMKL gemv call.