-
Notifications
You must be signed in to change notification settings - Fork 39
Add DPNP Framework Support to Selected Benchmarks #34
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
Conversation
…ly a handful BMs are too long, it keeps the full reservation for those 3 or so :'(. Maybe use -t 30, not 300...
… npbranch update
- /README1.md - /README.md
Changes were reverted so had missed this one
tbennun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! Overall it looks good. However, there are some important notes on the readme that need to be addressed, as well as other comments that I left.
README.md
Outdated
| ## Quickstart | ||
|
|
||
| To install NPBench, simply execute: | ||
| IF Dpnp is critical to you, see below. Otherwise, to install NPBench, simply execute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dpnp is one framework out of several, please refrain from starting the quickstart section with that.
README.md
Outdated
| ## Quickstart | ||
|
|
||
| To install NPBench, simply execute: | ||
| IF Dpnp is critical to you, see below. Otherwise, to install NPBench, simply execute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dpnp is one framework out of several, please refrain from starting the quickstart section with that.
README.md
Outdated
| ```bibtex | ||
| @inproceedings{ | ||
| npbench-dpnp, | ||
| author = {Ranjith et al.}, | ||
| year = {2021}, | ||
| title = {In prep.} | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only publication that needs to be cited if using NPBench is NPBench; if, e.g., Numba is used, then Numba will be cited separately.
main.py
Outdated
| @@ -0,0 +1,72 @@ | |||
| import argparse | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming quickstart.py to main.py should be done as a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just remove this file from the PR for now.
environment.yml
Outdated
| - https://software.repos.intel.com/python/conda | ||
| dependencies: | ||
| - python=3.10.14 | ||
| - numpy=1.26.4 # dpnp theoretically requires numpy<=1.24.4, numba-dpex numpy>=1.26.4; seems that 1.26.4 works fine even dor dpnp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - numpy=1.26.4 # dpnp theoretically requires numpy<=1.24.4, numba-dpex numpy>=1.26.4; seems that 1.26.4 works fine even dor dpnp | |
| - numpy=1.26.4 # dpnp theoretically requires numpy<=1.24.4, numba-dpex numpy>=1.26.4; seems that 1.26.4 works fine even for dpnp |
| B[1:-1] = 0.33333 * (A[:-2] + A[1:-1] + A[2:]) | ||
| A[1:-1] = 0.33333 * (B[:-2] + B[1:-1] + B[2:]) | ||
|
|
||
| return A,B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was a return value added to this benchmark?
| def kernel(alpha, beta, A, B, C, D): | ||
|
|
||
| D[:] = alpha * A @ B @ C + beta * D | ||
| return D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was a return value added to this benchmark?
README.md
Outdated
| With `dpnp` it is strongly recommended to use `conda` instead of `pip` for its dependency on intel packages. | ||
| Refer to this | ||
| [LINK](https://intelpython.github.io/dpnp/quick_start_guide.html#building-for-custom-sycl-targets) to know more | ||
| about building custom SYCL targets or installing `dpnp` package from intel channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| about building custom SYCL targets or installing `dpnp` package from intel channel. | |
| about building custom SYCL targets or installing `dpnp` package from the `intel` channel. |
README.md
Outdated
| If you are behind proxies, follow your system documentation. E.g. for pip you may have to specify: | ||
| ``` bash | ||
| $ python -m pip --proxy=http://localhost:1234 install <...> # where "localhost:1234" is the value of the env var "HTTP_PROXY" | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary to include in the instructions. It is a pip issue rather than an NPBench issue.
|
README.md: Updated as requested to include clarification about main.py and its purpose. main.py: This file is designed specifically for benchmarks supporting DPNP only. It is intentionally not renamed to quickstart. A line has been added to README.md explaining this distinction. environment.yml: Updated to reflect the latest changes. Benchmarks: Existing benchmarks have been updated based on suggestions, and a new benchmark covariance2 has been added. Return Statements: Modified some functions to properly use return to ensure correct copying where applicable. Let me know if it's alright! |
alexnick83
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me. I suggest that you remove this main.py file; we can amend quickstart separately at a later stage.
main.py
Outdated
| @@ -0,0 +1,72 @@ | |||
| import argparse | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just remove this file from the PR for now.
integrates the DPNP framework into selected benchmarks