Skip to content
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

Conversation

chudur-budur
Copy link
Collaborator

[WIP] The numba_dpex func decorator is not cached nor does it properly support specialization. Addressing #861

  • add 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?

diptorupd and others added 30 commits January 9, 2023 23:42
   - 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`.
   - 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.
diptorupd and others added 14 commits January 9, 2023 23:42
    - 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.
   - 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 diptorupd force-pushed the refactor/kernel_interfaces branch 5 times, most recently from 637a04d to c74ea24 Compare January 18, 2023 22:04
@diptorupd diptorupd deleted the branch IntelPython:refactor/kernel_interfaces January 18, 2023 23:41
@diptorupd diptorupd closed this Jan 18, 2023
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.

3 participants