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

When building the wheel the file atomic_ops.spirv does compile but is not included in the archive #760

Closed
fcharras opened this issue Jul 28, 2022 · 2 comments · Fixed by #1103
Assignees
Labels
user User submitted issue

Comments

@fcharras
Copy link

fcharras commented Jul 28, 2022

Provided a build environment for numba_dpex, when running

python ./setup.py bdist_wheel

the archive does not include the file atomic_ops.spir, when installing the binary later there will not be support for atomic operations. But one can see that the file atomic_ops.spir, despite not being included in the archive, was effectively created.

The source of the issue might come from the MANIFEST.in or metadata in setup,py, those can be tricky to get right.

@fcharras
Copy link
Author

fcharras commented Aug 9, 2022

The workaround I've found is to run python setup.py develop before running python setup.py bdist_wheel, it ensures that spirv compile steps are triggered early enough to ensure that the packaging steps will index the binaries that are created during compilation and add it to the tarball.

@diptorupd diptorupd self-assigned this Oct 5, 2022
@diptorupd
Copy link
Contributor

diptorupd commented Oct 5, 2022

@fcharras More of an FYI at this point. I am working on overhauling the atomics support in numba-dpex (#783). The file you point to was added back when there was no native atomic instruction support in the hardware and the file atomic_ops.spir provided an emulation layer (copied from what the DPC++ compiler used to do) for atomics ops.

Since then, dpex does support generating native atomic instructions. The emulator is still the default and generating native atomics is an opt-in feature at the moment by setting NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE to a non zero value.

In my current work, I am evaluating if emulation is still needed and if we can make generation of native atomics instructions the default.

@mingjie-intel mingjie-intel added the user User submitted issue label Oct 19, 2022
@diptorupd diptorupd mentioned this issue Jul 26, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user User submitted issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants