-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update gold 2021 to 0.5.0rc2 #202
Conversation
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]>
Feature/program
@@ -1,4 +1,4 @@ | |||
#===------------- __init__.pxd - dpctl module --------*- Cython -*----------===# | |||
# ===------------ __init__.pxd - dpctl module --------*- Cython -*----------===# |
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.
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
.
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.
Thanks!
dpctl/__init__.py
Outdated
## This top-level dpctl module. | ||
## | ||
##===----------------------------------------------------------------------===## | ||
#===----------------- __init__.py - dpctl module -------*- Cython -*--------===# |
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 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.
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.
Cython was an obvious mistake, should be Python. I was following the convention LLVM uses, but we can make the change.
0.5.0rc2 has all the renaming changes from dppl to dpctl.