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

Add a with_workspaces function #2099

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Conversation

amontoison
Copy link
Member

close #1767
@maleadt Can you review the PR?

@maleadt
Copy link
Member

maleadt commented Sep 28, 2023

LGTM. Maybe we could unify both definitions by defining with_workspace in terms of with_workspaces and passing a 0 CPU size? Or a nothing size, returning nothing?

@amontoison
Copy link
Member Author

amontoison commented Sep 28, 2023

LGTM. Maybe we could unify both definitions by defining with_workspace in terms of with_workspaces and passing a 0 CPU size? Or a nothing size, returning nothing?

I decided to pass a -1 CPU size. We can keep the same input type with this modification (Union{Integer,Function}) and we are sure to use two buffers even if a CUDA routine returns a size 0 for the CPU buffer.

@maleadt maleadt merged commit 3d8e7d8 into JuliaGPU:master Sep 29, 2023
1 check passed
@amontoison amontoison deleted the with_workspaces branch September 29, 2023 13:09
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.

[CUSOLVER] Add a with_workspaces function to allocate two buffers (Device / Host)
2 participants