Code reorganization: Removes ocl kernel API, moves math, print into kernel_api_impl #1420
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.
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_implall features in theocldeclandoclimplmodules have been cleanly implemented as a SYCL-like API and thus are no longer needed.Remove
core.types.array.ArrayHas been superseded by
USMNdArrayand was no longer needed.Minor fixes to imports
Minor linter highlighted fixes.
Move
printimplintokernel_api_impl.spirvEach backend for
kernel_apishould provide its ownprintimplementation that will be registered to the backend's typing and target contexts. Thus, the module belongs insidekernel_api_impl.spirv.Move
ocl.mathimplandocl.mathdeclintokernel_api_impl.spirv.mathMoves the standard lib
mathmodule support from top-leveloclmodule intokernel_api_impl.spirv.mathand gets rid ofoclcompletely. Each back end forkernel_apihas 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.#Fixes #795