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

Updated the generate-cuda script. Works for py >= 3.8 #1231

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

findingmochi
Copy link
Collaborator

The ast library had an API change for python >= 3.8. https://bugs.python.org/issue40430. I couldn't update the script to work with all versions of Python, since doing that leads to more dead ends. After talking to Jim, the generated kernels will be checked in to the source tree very soon, so getting the script to work on any recent Python version will work for now.

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #1231 (18f81f6) into main (5f5687f) will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted Files Coverage Δ
src/awkward/_v2/operations/reducers/ak_all.py 91.66% <0.00%> (-8.34%) ⬇️
src/awkward/_v2/operations/reducers/ak_any.py 91.66% <0.00%> (-8.34%) ⬇️
src/awkward/_v2/operations/reducers/ak_prod.py 91.66% <0.00%> (-8.34%) ⬇️
src/awkward/_v2/operations/reducers/ak_count.py 91.66% <0.00%> (-8.34%) ⬇️
...wkward/_v2/operations/reducers/ak_count_nonzero.py 91.66% <0.00%> (-8.34%) ⬇️
...c/awkward/_v2/operations/reducers/ak_linear_fit.py 85.71% <0.00%> (-1.52%) ⬇️
src/awkward/_v2/contents/content.py 81.57% <0.00%> (-0.17%) ⬇️
src/awkward/_v2/operations/reducers/ak_sum.py 100.00% <0.00%> (ø)
src/awkward/_v2/operations/structure/ak_flatten.py 91.66% <0.00%> (ø)
src/awkward/_v2/contents/recordarray.py 78.01% <0.00%> (+0.21%) ⬆️
... and 12 more

@jpivarski
Copy link
Member

(First question: is this meant to be a draft? I don't know if the changes here are intended to be final. The tests pass! :))

As I said in Slack, this script is not intended to have a long lifetime. Pretty soon, we'll generate the CUDA source code one last time and then check it into git for maintenance by hand. Then the script will just be removed. Therefore, it doesn't need to run in all versions of Python; just get it to run in the most convenient version of Python, probably 3.10 because that's the one you're using on your laptop. (I'm using 3.9, but I think all the changes to the ast module are between 3.7 and 3.8.)

@findingmochi
Copy link
Collaborator Author

This is it! You can go ahead and merge it. The script works on my machine which has Python 3.10. And I'll try to check in the auto-generated kernels by the end of next week so this script would have served it's purpose by then.

@jpivarski jpivarski merged commit 5738923 into main Jan 20, 2022
@jpivarski jpivarski deleted the swishdiff/generate-cuda-fix branch January 20, 2022 16:31
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.

2 participants