Skip to content

Add kDLROCMHost and kDLCUDAManaged - #71

Merged
tqchen merged 2 commits into
dmlc:mainfrom
leofang:new_dev_types
May 27, 2021
Merged

tqchen merged 2 commits into
dmlc:mainfrom
leofang:new_dev_types

Conversation

@leofang

@leofang leofang commented May 19, 2021

Copy link
Copy Markdown
Collaborator

Close #70.

btw I feel kDLExtDev should possess a very high value (like 999) so that we don't get clogged in the DLDeviceType enum spectrum, but changing its value is something beyond the scope of this PR.

@tqchen
tqchen merged commit 9b6176f into dmlc:main May 27, 2021
@leofang
leofang deleted the new_dev_types branch May 27, 2021 15:43
@leofang

leofang commented May 27, 2021

Copy link
Copy Markdown
Collaborator Author

Thanks, @tqchen!

@seberg

seberg commented May 27, 2021

Copy link
Copy Markdown
Collaborator

Since it requires checking 4 devices now (and more might be added?), should there be a macro or other scheme to check whether memory is transparently accessible from the CPU?

@leofang

leofang commented May 27, 2021

Copy link
Copy Markdown
Collaborator Author

@seberg Sounds like you want to add a query function to the DLPack header so that everyone can reuse it? I think it is a good idea given that you also brought up another common API on deleter.

@vadimkantorov

vadimkantorov commented May 27, 2021 •

Copy link
Copy Markdown

Also a question, could device id be using a fixed-width type, such as uint32_t or int32_t instead of int? This is simpler for doing bindings...

@leofang

leofang commented Jun 2, 2021

Copy link
Copy Markdown
Collaborator Author

@tqchen and all: Could you make a new DLPack release (v0.6) to include this change please? Thanks!

@jakirkham

Copy link
Copy Markdown

Should we doing something about Vadim's concern first? Asking as it may be harder to change after a release :)

@leofang

leofang commented Jun 2, 2021 •

Copy link
Copy Markdown
Collaborator Author

@jakirkham That'd break ABI and I don't think the recent DLPack iterations have done that. I'd suggest for @vadimkantorov to open an issue to discuss that point first, likely we also need to handle #74 so that we can signal ABI breaking.

I am requesting a new release simply based on the experience with the previous release #69: it was done almost right after #68 was merged, as the ABI is preserved. I expect the same can be done for this PR.

@tqchen

tqchen commented Jun 2, 2021 •

Copy link
Copy Markdown
Member

Changing to int to int32_t likely won't break the ABI(as all platforms that i am aware right now does that) and i think it can be a welcomed change

@vadimkantorov

vadimkantorov commented Jun 2, 2021 •

Copy link
Copy Markdown

I also read online that enums with values <= 255 must occupy 1 byte - could be good to have it stated somewhere in the docs. Unfortunately, it seems that in C one cannot enforce bit-width for enum type.

@leofang

leofang commented Jun 26, 2021

Copy link
Copy Markdown
Collaborator Author

@tqchen Friendly nudge for a v0.6 release. I'd like to make this PR available asap. Thanks!

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.

[RFC] Add kDLROCMHost and kDLCUDAManaged

5 participants