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

ElementwiseKernel: add get_global and fix bug in get_texref #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bailsman
Copy link
Contributor

This adds get_global to ElementwiseKernel so you can use constant memory in one.

get_texref was also broken: the use_range parameter was a kwarg instead of normal arg, causing the memoizer to see it as a different call. So you'd get a texref to a different module.

@inducer
Copy link
Owner

inducer commented Mar 16, 2018

Could you add/update the docs?

@bailsman
Copy link
Contributor Author

Hmm. What's a good place to document this? ElementwiseKernel is only mentioned briefly in doc/source/array.rst. I suppose I could add a sentence there that .get_global() works on ElementwiseKernel.

There's also the detail that to use an old style texref, you have to bind it to the module, and we don't provide an easy interface to do that yet. If we want to document and make get_texref() easy to actually use, maybe we should have get_texref() automatically add the texref to module.texrefs so that they get bound whenever you call the module. Or we could encourage people to use texture objects instead ;)

Base automatically changed from master to main March 8, 2021 05:16
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