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

Clean up deprecations #50

Merged
merged 5 commits into from
Dec 28, 2024
Merged

Clean up deprecations #50

merged 5 commits into from
Dec 28, 2024

Conversation

alexfikl
Copy link
Contributor

This cleans up some deprecations and makes sure the examples still run.

Comment on lines 116 to 118
pointer = pycuda.driver.mem_alloc(length * 4)
pycuda.driver.memset_d32(pointer, constant_value, length)
a = pycuda.gpuarray.GPUArray((length,), np.int32, gpudata=pointer)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example doesn't work for me. It dies somewhere around here when calling module.adjacentDifference(a) with

TypeError: No registered converter was able to produce a C++ rvalue of type unsigned long long from this Python object of type DeviceAllocation

Not quite sure if that's some change in pycuda that wasn't updated here or what :(

@@ -166,7 +168,8 @@ def compile(self, toolchain, **kwargs):
"""

from codepy.libraries import add_boost_python
toolchain = toolchain.copy()

toolchain = replace(toolchain)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not sure if this replace does what it should. All libraries, includes, etc, in toolchain are lists and this just performs a shallow copy..

@inducer inducer merged commit 2c184c5 into inducer:main Dec 28, 2024
7 checks passed
@inducer
Copy link
Owner

inducer commented Dec 28, 2024

Thx!

@alexfikl alexfikl deleted the fix-deprecations branch December 28, 2024 17:20
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