Fixes #2118 : Setting CUDA function attributes#2120
Closed
andravin wants to merge 13 commits intocupy:masterfrom
Closed
Fixes #2118 : Setting CUDA function attributes#2120andravin wants to merge 13 commits intocupy:masterfrom
andravin wants to merge 13 commits intocupy:masterfrom
Conversation
add a FuncAttributes class to store all kernel attributes add an attributes property to the RawKernel class. This can be used to query the register and memory usage of the kernel.
refactor attributes test as a separate test case memoize the kernel attributes.
build the dictionary within raw.pyx instead
Moved RawKernel kernel generation into a property to facilitate re-use.
Fixed formatting.
Fixed python 2.x compatibility by making descriptors "new style" classes.
Member
|
It should be noted that this PR is based on #1874. |
Member
|
Linking @andravin's rationale here: #2118 (comment), which makes sense I think. |
Member
|
@kmaehashi could you take a look? |
Member
|
@andravin It'd be nice to document the usage of this feature somewhere. The current docstring Lines 54 to 62 in f86c365 is not clear about what can be read/set and how to set. Another possible place is cupy/docs/source/tutorial/kernel.rst Lines 171 to 212 in 24ecd08 A short description/example based on your #2118 (comment) should be enough. |
leofang
reviewed
Apr 3, 2019
Member
leofang
left a comment
There was a problem hiding this comment.
Just one quick question, perhaps need input from core dev.
Member
|
just a quick ping to see if this PR can maybe get a review. It would be nice to have this functionality. |
Contributor
Author
|
Closing due to lack of interest. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2118 .
Builds on @grlee77 commits to implement CUDA function attributes using descriptors.
Enables getting all function attributes and setting the
max_dynamic_shared_size_bytesandpreferred_shared_memory_carveoutattributes.Added property RawKernel.kernel to make access to the underlying kernel function re-usable.