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

Code reorganization: Removes ocl kernel API, moves math, print into kernel_api_impl #1420

Merged
merged 6 commits into from
Apr 4, 2024

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Mar 31, 2024

  • Have you provided a meaningful PR description?

The PR sifts through the mounds of tech debt accumulated over the years and cleans up whatever possible.

Summary of changes:

  • Remove the legacy OCL-like kernel API implementation

    It was the starting point of numba-dpex (aka numba-dppy aka numba-pydppl aka pydppl aka dppy, I forget the chronology). Now thanks to the target-specific overload-based kernel_api_impl all features in the ocldecl and oclimpl modules have been cleanly implemented as a SYCL-like API and thus are no longer needed.

  • Remove core.types.array.Array

    Has been superseded by USMNdArray and was no longer needed.

  • Minor fixes to imports

    Minor linter highlighted fixes.

  • Move printimpl into kernel_api_impl.spirv

    Each backend for kernel_api should provide its own print implementation that will be registered to the backend's typing and target contexts. Thus, the module belongs inside kernel_api_impl.spirv.

  • Move ocl.mathimpl and ocl.mathdecl into kernel_api_impl.spirv.math

    Moves the standard lib math module support from top-level ocl module into kernel_api_impl.spirv.math and gets rid of ocl completely. Each back end for kernel_api has to provide its implementation of the math functions, so the code belongs inside each back end. The code itself is not very well designed and not much can be done right now.

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

#Fixes #795

@diptorupd diptorupd marked this pull request as draft March 31, 2024 00:52
Copy link
Contributor

Documentation preview: show.

@diptorupd diptorupd force-pushed the technical-debt branch 2 times, most recently from 28fd813 to accc208 Compare March 31, 2024 10:56
@coveralls
Copy link
Collaborator

coveralls commented Apr 1, 2024

Coverage Status

coverage: 87.201% (+3.0%) from 84.227%
when pulling eb5a48b on technical-debt
into 4deff1a on main.

@diptorupd diptorupd force-pushed the technical-debt branch 2 times, most recently from 44d6eaf to b37f815 Compare April 1, 2024 20:59
@diptorupd diptorupd mentioned this pull request Apr 1, 2024
3 tasks
@diptorupd diptorupd force-pushed the technical-debt branch 2 times, most recently from 7afba84 to f9fdb91 Compare April 3, 2024 22:45
@diptorupd diptorupd changed the title Shed four years worth of technical debt Code reorganization: Removes ocl kernel API, moves math, print into kernel_api_impl Apr 3, 2024
@diptorupd diptorupd marked this pull request as ready for review April 3, 2024 22:45
@ZzEeKkAa ZzEeKkAa merged commit f2d3080 into main Apr 4, 2024
55 of 61 checks passed
@ZzEeKkAa ZzEeKkAa deleted the technical-debt branch April 4, 2024 18:32
github-actions bot added a commit that referenced this pull request Apr 4, 2024
Code reorganization: Removes ocl kernel API, moves math, print into kernel_api_impl f2d3080
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.

Convert the kernel API oclimpl intrinsic functions to overloads and move into a submodule inside core
3 participants