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

Issue #2533: Preserving the buffer type in linear algebra #2534

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

kmp5VT
Copy link

@kmp5VT kmp5VT commented Oct 28, 2024

An attempt to fix buffer type linear algebra issue. It looks like the CuArray function is called many times and there is no book keeping of the memory_type. I manually added to the CuArray function calls. One could also make this part of the function call. See Issue #2533

@kmp5VT kmp5VT changed the title Issue #2533 Issue #2533: Preserving the buffer type in linear algebra Oct 28, 2024
@maleadt
Copy link
Member

maleadt commented Oct 28, 2024

Thanks for the PR! It is often easier to use the similar function, which can take an eltype and dims:

similar(array, [element_type=eltype(array)], [dims=size(array)])

Create an uninitialized mutable array with the given element type and size, based upon the given source array. The second and third arguments are both optional, defaulting to the given array's eltype and size.
The dimensions may be specified either as a single tuple argument or as a series of integer arguments.

@kmp5VT
Copy link
Author

kmp5VT commented Oct 28, 2024

@maleadt Oh yes, similar is a better way to go. I will update these changes with similar, thanks!

@maleadt
Copy link
Member

maleadt commented Oct 30, 2024

Yeah looks better with similar 🙂 The memory_type now can go, though?

@maleadt
Copy link
Member

maleadt commented Oct 31, 2024

LGTM, CI failure unrelated.

Why the partial revert though?

@kmp5VT
Copy link
Author

kmp5VT commented Nov 1, 2024

@maleadt I wasn't sure what the failures were related to. With the changes I reverted, I haven't yet had time to verify that they work as expected so I wasn't sure if those changes were causing the check failures. I have more time today and can check that function and re-push the changes.

@kmp5VT
Copy link
Author

kmp5VT commented Nov 13, 2024

@maleadt I was able to check that the gebrd! code does work properly if all the tensors are on unified memory. I added back those changes. 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.

2 participants