diff --git a/Project.toml b/Project.toml index 3259e66..56df2a7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TensorAlgebra" uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" authors = ["ITensor developers and contributors"] -version = "0.1.1" +version = "0.1.2" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" diff --git a/src/TensorAlgebra.jl b/src/TensorAlgebra.jl index 9035f0b..1dd261a 100644 --- a/src/TensorAlgebra.jl +++ b/src/TensorAlgebra.jl @@ -1,4 +1,7 @@ module TensorAlgebra + +export contract, contract! + include("blockedpermutation.jl") include("BaseExtensions/BaseExtensions.jl") include("blockedtuple.jl") @@ -11,4 +14,5 @@ include("contract/allocate_output.jl") include("contract/contract_matricize/contract.jl") # TODO: Rename to `TensorAlgebraLinearAlgebraExt`. include("LinearAlgebraExtensions/LinearAlgebraExtensions.jl") + end diff --git a/test/Project.toml b/test/Project.toml index fe35b0f..c13f5f9 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -7,7 +7,6 @@ GradedUnitRanges = "e2de450a-8a67-46c7-b59c-01d5a3d041c5" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" diff --git a/test/test_basics.jl b/test/test_basics.jl index 7421879..35b35e0 100644 --- a/test/test_basics.jl +++ b/test/test_basics.jl @@ -3,10 +3,7 @@ using Combinatorics: permutations using EllipsisNotation: var".." using LinearAlgebra: norm, qr using TensorAlgebra: TensorAlgebra, blockedperm, blockedperm_indexin, fusedims, splitdims -# TODO: Remove dependency on NDTensors, create a GPUTestUtils.jl package. -using NDTensors: NDTensors -include(joinpath(pkgdir(NDTensors), "test", "NDTensorsTestUtils", "NDTensorsTestUtils.jl")) -using .NDTensorsTestUtils: default_rtol +default_rtol(elt::Type) = 10^(0.75 * log10(eps(real(elt)))) using Test: @test, @test_broken, @testset const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @testset "BlockedPermutation" begin diff --git a/test/test_exports.jl b/test/test_exports.jl new file mode 100644 index 0000000..f07654d --- /dev/null +++ b/test/test_exports.jl @@ -0,0 +1,6 @@ +using TensorAlgebra: TensorAlgebra +using Test: @test, @testset +@testset "Test exports" begin + exports = [:TensorAlgebra, :contract, :contract!] + @test issetequal(names(TensorAlgebra), exports) +end