-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding caching and specialization to dpex.func #869
Closed
chudur-budur
wants to merge
44
commits into
IntelPython:refactor/kernel_interfaces
from
chudur-budur:github-861
Closed
Adding caching and specialization to dpex.func #869
chudur-budur
wants to merge
44
commits into
IntelPython:refactor/kernel_interfaces
from
chudur-budur:github-861
Conversation
This file contains 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
- The compiler module only contains the compiler pipeline to compiler SpirvKernel objects.
- Creates a separate module for the unpack and pack functions for kernel arguments. - The new API is intended for use from the Dispatcher class.
- The concept of a kernel was decoupled from the notion of dispatching of a kernel. The present implementation in compiler.py intermixes both things, making hard the separation of compute-follows-data based kernel launch and legacy `dpctl.device_context` based behavior. - Deprecates support for numpy arrays as kernel args. - Deprecates support for the square bracket notation using `__getitem__` to provide global and local ranges for a kernel launch. - Changes the behavior of specializing a kernel using only a signature. The new way to specialize will require a device type and a backend. - Improvements to exception messages using custom exceptions. - The new API is now inside `numba_dpex.core.kernel_interface`.
Fix docs rst
- Kernel specialization for specific signatures was fixed. - Specialization is only allowed for usm_ndarray. - Dispacther class was renamed as JitKernel. - decorators updated.
- print a better type name with keywords and all attributes. - store a fully qualified filter string in the type. - set the default address space to GLOBAL instead of None. - fix the unify function to test on usm_type, device, address space.
- Added unit tests for the kernel specialization feature. - Fix kernel decorator to support list of signatures. - Disallow JIT compilation of a specialized kernel and raise an exception.
- Move sycl_usm_array_interface helper functions into core/utils. - Move array type conversion function for unknown type with sycl_usm_array_interface to UsmNdArray into core/typeconv. - Fix how the UsmNdArray type is constructed for unknow sycl_usm_array_interface arrays.
…ion using strings.
- Move compile_with_dpex into the core.compiler module. - The target and typing contexts are now not set from dpex_target inside the SpirvKernel.compile. They are passed in as args. - Fix tests impacted by these changes.
diptorupd
force-pushed
the
refactor/kernel_interfaces
branch
5 times, most recently
from
January 18, 2023 22:04
637a04d
to
c74ea24
Compare
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.
[WIP] The numba_dpex
func
decorator is not cached nor does it properly support specialization. Addressing #861add caching to
dpex.func
add specialization to
dpex.func
Have you provided a meaningful PR description?
Have you added a test, reproducer or referred to an issue with a reproducer?
Have you tested your changes locally for CPU and GPU devices?
Have you made sure that new changes do not introduce compiler warnings?
If this PR is a work in progress, are you filing the PR as a draft?