-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
The existing kernel dispatch API in numba_dpex.compiler.py is sub-optimal. There are several problems with the code:
- Interleaved code between dispatching a kernel and the actual representation of a kernel
- Error messages are a mix of prints and
ValueErrorandTypeErrorwith abstruse messages. - Improve the
USMArrayType. - the deprecated
dpctl.get_current_queuecall is embedded inside the API making it hard to separate out the legacydpctl.device_contextsupport from the compute-follows-data programming model. - There is no check on device backend. We always assume that the device supports SPIR-V.
- Pass llvm bitcode to llvm-spirv using stdin rather than first serializing the bitcode to disk #862
- Caching of kernels uses a dictionary and can lead to a growing memory footprint of a dpex program. Instead, Numba's caching mechanism should be used to cache compiled kernel functions.
- The check for legal global ranges is commented out.
- Compiling a kernel with a specific signature always uses
dpctl.get_current_queue
The code is also not properly documented nor are there API documentation generated. Unit test coverage can be improved too.
- Generate API documentation and developer guide for the kernel API.
- Update examples to use compute-follows-data for kernels.
- Generate class UML diagrams.
These issues have to be fixed before new feature development and bug fixes can be implemented for the dpex kernel API.
#804 is a WIP PR to fix these issues and make the API modular and properly documented with high coverage.
fcharras
Metadata
Metadata
Assignees
Labels
No labels