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

Cached workspace prototype for custatevec #2279

Merged
merged 6 commits into from
Mar 11, 2024
Merged

Cached workspace prototype for custatevec #2279

merged 6 commits into from
Mar 11, 2024

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Mar 3, 2024

Attempt to attach a buffer to each library handle so we can re-use the buffers for many small calls to the same handle and avoid thrashing GC.

@kshyatt kshyatt requested a review from maleadt March 3, 2024 17:44
Copy link

codecov bot commented Mar 3, 2024

Codecov Report

Attention: Patch coverage is 89.92248% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 72.02%. Comparing base (2783c88) to head (aefb38d).

Files Patch % Lines
lib/cusparse/generic.jl 84.74% 9 Missing ⚠️
lib/utils/call.jl 90.90% 2 Missing ⚠️
lib/custatevec/src/cuStateVec.jl 85.71% 1 Missing ⚠️
lib/custatevec/src/statevec.jl 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2279      +/-   ##
==========================================
+ Coverage   72.00%   72.02%   +0.02%     
==========================================
  Files         155      155              
  Lines       14862    14881      +19     
==========================================
+ Hits        10701    10718      +17     
- Misses       4161     4163       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably something useful we could apply to other libraries too.

lib/custatevec/src/statevec.jl Outdated Show resolved Hide resolved
lib/custatevec/src/cuStateVec.jl Outdated Show resolved Hide resolved
lib/custatevec/src/cuStateVec.jl Outdated Show resolved Hide resolved
lib/custatevec/src/statevec.jl Outdated Show resolved Hide resolved
@kshyatt
Copy link
Contributor Author

kshyatt commented Mar 9, 2024

Fixed all except adding to with_workspace -- are we all on board with introducing this there as well?

@maleadt maleadt added enhancement New feature or request cuda libraries Stuff about CUDA library wrappers. labels Mar 11, 2024
@maleadt
Copy link
Member

maleadt commented Mar 11, 2024

Alright, this looks nice. We could probably apply this pattern to more libraries, but let's merge this already.

@maleadt maleadt merged commit bb49887 into master Mar 11, 2024
1 check passed
@maleadt maleadt deleted the ksh/cached_sv branch March 11, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants