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

Remove NumPy argument support for dpex kernels #866

Closed
wants to merge 55 commits into from

Conversation

mingjie-intel
Copy link
Contributor

We will stop supporting NumPy arrays as arguments to kernel. The following API changes need to be made:

  • Remove array_access_specifiers from JitKernel init
  • Remove get_ordered_arg_access_types
  • Simplify JitKernel._determine_kernel_launch_queue
  • Remove the special case for calling npytypes_array_to_dpex_array inside target.TypingContext. Instead if a NumPy array argument is detected raise an exception.
  • Remove access types from Packer
  • Remove support for array from Packer._unpack_arguments
  • Remove _pack_array from Packer and sycl_queue in init

Diptorup Deb 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 diptorupd force-pushed the refactor/kernel_interfaces branch from 1395e18 to 584d63b Compare January 11, 2023 23:46
mingjie-intel and others added 3 commits January 12, 2023 08:29
Removed test_black_scholes.py.
Renamed dppy to dpex in two test files.
   - The compute follows data checking is now based on queue
     equality.
   - USMNdArray no longer requires usm_type and device
     during construction. It allows us to specialize an usm_ndarray
     only on ndims, layout and dtype.
   - No check for compute follows data for eager compilation.
   - Change caching to not require backend and device-type.
   - Fixes to test cases.
@diptorupd diptorupd force-pushed the refactor/kernel_interfaces branch from 46e2e90 to 63acaee Compare January 13, 2023 02:39
@diptorupd diptorupd force-pushed the refactor/kernel_interfaces branch 4 times, most recently from 637a04d to c74ea24 Compare January 18, 2023 22:04
Base automatically changed from refactor/kernel_interfaces to main January 18, 2023 23:41
@diptorupd
Copy link
Contributor

Superseded by #1049

@diptorupd diptorupd closed this May 20, 2023
@mingjie-intel mingjie-intel linked an issue May 20, 2023 that may be closed by this pull request
7 tasks
@diptorupd diptorupd deleted the numpy_removal branch September 21, 2023 13:12
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.

Remove NumPy argument support for dpex kernels
3 participants