-
Notifications
You must be signed in to change notification settings - Fork 4
Some more small changes for GPU support #48
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cf3c11f
Updates for GPU compatibility for MPSKit
kshyatt eb88c63
Fixes for BraidingTensor and svd
kshyatt 84c67b4
Formatter
kshyatt 18ffe0b
Cleanup removeunit
kshyatt 050cba4
Move over storagetype logic from TensorKit
kshyatt 6c83289
Missing module qualifier
kshyatt 3f46738
Undo ugly formatting changes
kshyatt c89afa3
move auxiliary code
lkdvos 0c58d9e
remove unnecessary auxiliary code
lkdvos c9d5318
use similar_diagonal
lkdvos 2870ca3
revert tensorcontract_type changes
lkdvos 4ce3679
try and revert storagetype
lkdvos 846c90d
bump v0.3.10
lkdvos 61990ee
fix copy_dense!
lkdvos f48fa24
fix with empty tensors
lkdvos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| function copy_dense!(Adense, A) | ||
| for block_index in Iterators.product(blockaxes(A)...) | ||
| a = view(A, block_index...) | ||
| indices = getindex.(axes(A), block_index) | ||
| Adense[indices...] .= a | ||
| end | ||
| return Adense | ||
| end | ||
|
|
||
| const BlockBlasMat{T <: MAK.BlasFloat} = BlockMatrix{T} | ||
|
|
||
| function MAK.zero!(A::BlockBlasMat) | ||
| for bj in blockaxes(A, 2), bi in blockaxes(A, 1) | ||
| a = view(A, bi, bj) | ||
| MAK.zero!(a) | ||
| end | ||
| return A | ||
| end | ||
|
|
||
| function MAK.one!(A::BlockBlasMat) | ||
| for bj in blockaxes(A, 2), bi in blockaxes(A, 1) | ||
| a = view(A, bi, bj) | ||
| bi == bj ? MAK.one!(a) : MAK.zero!(a) | ||
| end | ||
| return A | ||
| end |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW this is wrong for GPU arrays, the output of the
similaris aMatrix...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHYYYYYYYY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind if I fix in a follow up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all!