Skip to content

Commit 5fb4696

Browse files
authored
[ITensorsPackageCompilerExt] Superseding indictment of ITensorsPackageCompilerExt (#1550)
1 parent aa26798 commit 5fb4696

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
33
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.6.21"
4+
version = "0.6.22"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module ITensorsPackageCompilerExt
22
include("compile.jl")
3-
include("precompile_itensors.jl")
43
end

src/packagecompile/compile.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ function compile(; backend=Algorithm"PackageCompiler"(), kwargs...)
4040
return compile(backend; kwargs...)
4141
end
4242

43-
function compile(::Algorithm; kwargs...)
44-
return error(
45-
"As of ITensors v0.5, you must install `PackageCompiler.jl` (`using Pkg: Pkg; Pkg.add(\"PackageCompiler\")`) and execute `using PackageCompiler` to use `ITensors.compile`.",
46-
)
47-
end
48-
4943
@doc """
5044
ITensors.compile(; dir = "$(default_compile_dir())",
5145
filename = "$(default_compile_filename())")

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
1212
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1313
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
1414
OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0"
15+
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
1516
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1617
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
1718
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[deps]
2+
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
3+
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
4+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@eval module $(gensym())
2+
using ITensors: ITensors
3+
using PackageCompiler: PackageCompiler
4+
using Test: @testset, @test
5+
@testset "ITensorsPackageCompilerExt" begin
6+
# Testing `ITensors.compile` would take too long so we just check
7+
# that `ITensorsPackageCompilerExt` overloads `ITensors.compile`.
8+
@test hasmethod(ITensors.compile, Tuple{ITensors.Algorithm"PackageCompiler"})
9+
end
10+
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ITensors.disable_threaded_blocksparse()
2020
"threading",
2121
"lib/ContractionSequenceOptimization",
2222
"ext/ITensorsChainRulesCoreExt",
23+
"ext/ITensorsPackageCompilerExt",
2324
"ext/ITensorsVectorInterfaceExt",
2425
]
2526
@time for dir in dirs

0 commit comments

Comments
 (0)