-
Notifications
You must be signed in to change notification settings - Fork 33
Add setup.py and conda-recipe #5
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
Conversation
It is initial draft version.
Now numba.dppl is placed in separate package numba_dppy.
Previousply it was `from numba import dppl`. Now it is `import numba_dppy as dppl`.
There are many places in code which access to `numba_dppy`. Previously it was `numba.dppl`. It was accessible because `from numba import dppl`.
This parameters are necessary for PyPI.
`dispatcher_registry.ondemand['dppl'] = init_jit` can be used only one time. So `dppl` was renamed to `dppy`. Also in class TargetDispatcher field `target_dppl = 'dppl'` renamed to `dppy`.
This flag configure installation of `numba_dppy` as folder in `site-packages`. The folder is required for installing compiled spirv code to it.
%CC% -flto -target spir64-unknown-unknown -c -x cl -emit-llvm -cl-std=CL2.0 -Xclang -finclude-default-header numba_dppy/ocl/atomics/atomic_ops.cl -o numba_dppy/ocl/atomics/atomic_ops.bc | ||
llvm-spirv -o numba_dppy/ocl/atomics/atomic_ops.spir numba_dppy/ocl/atomics/atomic_ops.bc | ||
xcopy numba_dppy\ocl\atomics\atomic_ops.spir %SP_DIR%\numba_dppy\ocl\atomics /E /Y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move SPIRV compilation to setup.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to IntelPython/numba#110
- dpctl | ||
- spirv-tools | ||
- llvm-spirv | ||
- dpnp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dpNP is optional dependency
--------------------------------------------------------------------------- | ||
import numpy as np | ||
from numba import dppl | ||
import numba_dppy, numba_dppy as dppl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename dppl
to dppy
.
|
||
metadata = dict( | ||
name="numba-dppy", | ||
version="0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use versioneer.py
Now with setup.py it is possible to install and run tests. Via tests I have faced with many access to
numba.dppl
.This PR also replaces access like
numba.dppl
tonumba_dppy
.Some code uses
@dppl.kernel
. For this casesimport numba_dppy as dppl
. It could be renamed todppy
in separate PR.Now tests passed (should recheck on clean numba). Commands:
Related to:
numba-dppy
numba#109numba-dppy
numba#110