-
Notifications
You must be signed in to change notification settings - Fork 11
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
add device<->host transfer mappers #282
Conversation
arraycontext/impl/pytato/utils.py
Outdated
import arraycontext.impl.pyopencl.taggable_cl_array as tga | ||
if isinstance(expr.data, tga.TaggableCLArray): | ||
data = expr.data.get() | ||
return DataWrapper( |
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.
@majosm asked in inducer/pytato#548 (comment)
Can we make this return an instance of a new
DataWrapper
type that can__hash__
by data instead ofid
? That would remove the need for data wrapper deduplication, if I understand the intended use of these mappers correctly.
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.
Not sure; in that case, we probably should probably also override the EqualityComparer
, otherwise we would get a lot of hash collisions when caching.
This is ready for a first review; I'm not sure what to do about the pylint errors. |
Please do add these to the docs, and then this should be ready to go. |
Added in b20d359 |
Followup of inducer/pytato#548
Implements part of inducer/pytato#547
TODOs:
Please squash