Skip to content

Update gold 2021 to 0.5.0rc2 #202

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

Merged
merged 10 commits into from
Dec 5, 2020

Conversation

diptorupd
Copy link
Contributor

0.5.0rc2 has all the renaming changes from dppl to dpctl.

vlad-perevezentsev and others added 10 commits November 26, 2020 06:46
Fix problems in dpctl identified with Klockwork static code analysis
* Added Cython examples

1. Cython/sycl_direct_linkage

Example of native extension "cdef import"-ing sycl C++ classes directly
from CL/sycl.hpp

Queue is created within the function, adding measurable overhead.

Extension uses GEMV to compute column-wise total of a C-contiguous matrix,
and illustrates linking to oneMKL.

2. Cython/sycl_bufer

Example of native extension building on the above, but illustrating getting
the queue from dpctl.

3. Cython/usm_memory

Example of native extension allocating USM shared memory via dpctl, and using
it as a buffer underlying NumPy array.

Cython functions dispatches to a SYCL code that works with USM pointer.

One function populates USM memory underneath NumPy array with random numbers
using ``oneapi::mkl::rng::device`` function used in SYCL kernel, with random
number being parameters of European vanilla options.

The second function uses SYCL to price these options using Black-Scholes
formula.

* updated create_sycl_queues.py to run on current dpctl

* Extended sycl_buffer example to implement column-wise summation without MKL

* few examples illustrating MemoryUSM* objects

* have it black's way

* Adjusted examples section of global README.md
* Rename dppl to dpctl

* Formatting fixes

Co-authored-by: etotmeni <[email protected]>
@@ -1,4 +1,4 @@
#===------------- __init__.pxd - dpctl module --------*- Cython -*----------===#
# ===------------ __init__.pxd - dpctl module --------*- Cython -*----------===#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not necessary to fix number of #.
Possibly @diptorupd you are using old version of black. Use 20.8b1 as pointed in CONTRIBUTING.md. Conda provides version 19.10b0. Pip provides 20.8b1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

## This top-level dpctl module.
##
##===----------------------------------------------------------------------===##
#===----------------- __init__.py - dpctl module -------*- Cython -*--------===#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like this line. It duplicates file name and also it lies about Cython. Conclusion: unnecessary support costs.
Lets keep only License at the header of the file and docstring with description of the content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cython was an obvious mistake, should be Python. I was following the convention LLVM uses, but we can make the change.

@diptorupd diptorupd merged commit f67d2c6 into IntelPython:gold/2021 Dec 5, 2020
@diptorupd diptorupd deleted the update-gold-2021-0.5.0rc2 branch January 16, 2021 18:25
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.

5 participants