Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NDTensors/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NDTensors"
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
authors = ["Matthew Fishman <[email protected]>"]
version = "0.4.5"
version = "0.4.6"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down Expand Up @@ -69,7 +69,7 @@ EllipsisNotation = "1.8"
FillArrays = "1"
Folds = "0.2.8"
Functors = "0.2, 0.3, 0.4, 0.5"
GPUArraysCore = "0.1"
GPUArraysCore = "0.1, 0.2"
HDF5 = "0.14, 0.15, 0.16, 0.17"
HalfIntegers = "1"
InlineStrings = "1"
Expand Down
2 changes: 1 addition & 1 deletion NDTensors/src/lib/Expose/test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
Metal = "dde4c033-4e86-420c-a63e-0dd931031962"
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8 changes: 4 additions & 4 deletions NDTensors/src/lib/Expose/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ using NDTensors.GPUArraysCoreExtensions: cpu
expose(o)[] = 2
@test expose(o)[] == 2

fill!(m, 0)
fill!(m, zero(elt))
@test any(!Base.isinf, expose(m))

mp = copy(Ea)
@test mp == ma
fill!(ma, 2.0)
fill!(ma, elt(2))
copyto!(expose(mp), expose(ma))
@test mp == ma

Expand Down Expand Up @@ -112,7 +112,7 @@ using NDTensors.GPUArraysCoreExtensions: cpu
@test norm(m) ≈ sqrt(6^2 * 10)

m = reshape(m, (5, 2, 1))
mt = fill!(similar(m), 3.0)
mt = fill!(similar(m), elt(3))
m = permutedims(expose(m), (2, 1, 3))
@test size(m) == (2, 5, 1)
permutedims!(expose(m), expose(mt), (2, 1, 3))
Expand Down Expand Up @@ -184,7 +184,7 @@ using NDTensors.GPUArraysCoreExtensions: cpu
copyto!(expose(y), expose(x))
@allowscalar begin
@test y == x
## temporarily use expose copy because this is broken in Metal 1.1
## temporarily use expose copy because this is broken in Metal 1.1
@test copy(expose(x)) == x
end

Expand Down
6 changes: 3 additions & 3 deletions NDTensors/test/test_dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NDTensors.dim(i::MyInd) = i.dim

Aview = A[2:3, 2:3]
@test dims(Aview) == (2, 2)
## Added for issue 1431 create a tensor from
## Added for issue 1431 create a tensor from
## a sliced view of another tensor
Acopy = Tensor(NDTensors.storage(Aview), (1, 4))
@test NDTensors.cpu(data(Acopy)) == NDTensors.cpu(data(Aview))
Expand Down Expand Up @@ -233,7 +233,7 @@ NDTensors.dim(i::MyInd) = i.dim
@testset "Contraction with size 1 block and NaN" begin
@testset "No permutation" begin
R = dev(Tensor(complex(elt), (2, 2, 1)))
fill!(R, NaN)
fill!(R, elt(NaN))
@test @allowscalar any(isnan, R)
T1 = dev(randomTensor(elt, (2, 2, 1)))
T2 = dev(randomTensor(complex(elt), (1, 1)))
Expand All @@ -244,7 +244,7 @@ NDTensors.dim(i::MyInd) = i.dim

@testset "Permutation" begin
R = dev(Tensor(complex(elt), (2, 2, 1)))
fill!(R, NaN)
fill!(R, elt(NaN))
@test @allowscalar any(isnan, R)
T1 = dev(randomTensor(elt, (2, 2, 1)))
T2 = dev(randomTensor(complex(elt), (1, 1)))
Expand Down
Loading