-
Notifications
You must be signed in to change notification settings - Fork 134
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
[RFC] Rename kDLGPU to kDLCUDA, and kDLCPUPinned to kDLCUDAHost #67
Comments
I think it would be feasible to add Renaming will likely bump Additionally, is there any guidelines about extended |
All of the changes so far(including this one) are ABI compatible, which means a system uses an earlier version of DLPack can be imported in a later version(because the number has not change, we are just rename the field). For the same reason, we might want to avoid change the number (e.g. DLExtDev) but instead introduce new numbers. ABI breaking changes shall be considered more seriously, and so far we have not yet encountered them |
While this isn't an ABI breaking change it will break the build of someone using |
We would assume the consumer of dlpack maintain a copy(or submodule hash) of a particular version. So the framework can choose to upgrade the DLPack while updating the usage of kDLGPU to kDLCUDA. Perhaps we can keeping kDLGPU, kDLCPUPinned for another release cycle as alias would resolve the source compatibility issue |
I took a quick look at PyTorch and I think this line should be fixed, but it's likely irrelevant of this RFC (not sure): By the way, can we please add a new entry |
On a second thought, EDIT: fix uppercase names. |
I think renaming is much better than using an alias. That just drags out the work rather than reduce it, unless the intent is to keep an alias forever (which seems not desirable). And while C enum's can have duplicate values, it is normally expected for them to unique. It seems to me like there is no real source compatibility issue, people just need to rename if they upgrade their vendored copy of Recently |
To follow on @leofang 's comment, |
I think this is fine since pinned memory is allocated via So, let me recap what has been discussed so far:
For now we do not add EDIT: fix uppercase names. |
The managed memory could go to a second RFC as it would be more involved than renaming |
Thank you all for the discussion! I will create a PR to do the renaming only for now. |
Implemented by #68 |
This RFC proposes to rename
kDLGPU
tokDLCUDA
, andkDLCPUPinned
tokDLCUDAHost
. Two main reasons for this renaming:torch.cuda
to support CUDA tensor types, so this renaming will make it more consistent with the other frameworks.Look forward to hearing your thoughts!
The text was updated successfully, but these errors were encountered: