-
Notifications
You must be signed in to change notification settings - Fork 56
Start on CUDA extension #325
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
base: main
Are you sure you want to change the base?
Conversation
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/tensors/tensor.jl b/src/tensors/tensor.jl
index e60d4d9..6946796 100644
--- a/src/tensors/tensor.jl
+++ b/src/tensors/tensor.jl
@@ -316,15 +316,15 @@ end
for randf in (:rand, :randn, :randexp, :randisometry)
_docstr = """
- $randf([rng=default_rng()], [TorA=Float64], codomain::ProductSpace{S,N₁},
- domain::ProductSpace{S,N₂}) where {S,N₁,N₂,T} -> t
- $randf([rng=default_rng()], [TorA=Float64], codomain ← domain) -> t
+ $randf([rng=default_rng()], [TorA=Float64], codomain::ProductSpace{S,N₁},
+ domain::ProductSpace{S,N₂}) where {S,N₁,N₂,T} -> t
+ $randf([rng=default_rng()], [TorA=Float64], codomain ← domain) -> t
Generate a tensor `t` with entries generated by `$randf`.
- The type `TorA` can be used to control the element type and
- data type generated. For example, if `TorA` is a `CuVector{ComplexF32}`
- or `ROCVector{Float64}`, then the final output `TensorMap` will have
- that as its storage type.
+ The type `TorA` can be used to control the element type and
+ data type generated. For example, if `TorA` is a `CuVector{ComplexF32}`
+ or `ROCVector{Float64}`, then the final output `TensorMap` will have
+ that as its storage type.
See also [`Random.$(randf)!`](@ref).
""" |
01278bc to
b8254e2
Compare
|
I kind of failed to realize that |
|
I think I have them mostly working now, actually... let me push in a moment |
* initial basic design SectorVector * some additional functionality * relax `foreachblock` signature * replace `SectorDict` with `SectorVector` for eig/svdvals * export `svd_vals` * clean up SectorVector design * small fix * add finitedifferences support * update changelog * some simplifications and extensions * some further fixes * some more fixes * update dates --------- Co-authored-by: Jutho Haegeman <jutho.haegeman@ugent.be>
7f2ba7d to
bc33c50
Compare
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
a4d32fc to
677f4af
Compare
|
Haven't looked at the tests in detail yet, but certainly looks very good already. |
|
Re the tests, they are mostly copied from the CPU |
bcbe1eb to
2c6af42
Compare
|
OK I think I've responded to everything 🧐 |
|
I can't get the format issue to appear locally... |
c47e269 to
1038e66
Compare
|
OK, is there anything else this needs besides #333 and somehow fixing the format check? |
26f050f to
181da54
Compare
lkdvos
left a comment
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.
Except for my remaining question about the convert, and the comment about the tagged MatrixAlgebraKit version, I'm happy to merge this.
As always, thanks for the enormous amount of work (and patience), much appreciated!
src/tensors/tensor.jl
Outdated
| $randf([rng=default_rng()], [TorA=Float64], codomain::ProductSpace{S,N₁}, | ||
| domain::ProductSpace{S,N₂}) where {S,N₁,N₂,T} -> t | ||
| $randf([rng=default_rng()], [T=Float64], codomain ← domain) -> t | ||
| $randf([rng=default_rng()], [TorA=Float64], codomain ← domain) -> t | ||
| Generate a tensor `t` with entries generated by `$randf`. | ||
| The type `TorA` can be used to control the element type and | ||
| data type generated. For example, if `TorA` is a `CuVector{ComplexF32}` | ||
| or `ROCVector{Float64}`, then the final output `TensorMap` will have | ||
| that as its storage type. |
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.
This looks like there might be some slight indenting issues?
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.
Was me fighting with the formatter
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
181da54 to
3949ec0
Compare
This splits off basic support for CUDA tensor maps from #320, and doesn't cover Diagonals or factorizations at all. I made some modifications to things in
srcto make them a little more generic also. Some things aren't working yet:AdjointTensorMapof aCuTensorMapto aCuTensorMapof a different scalar typeCuArrayhasfusiontensor(I)testsdiag/diagm