Skip to content
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

[ITensorsPackageCompilerExt] Superseding indictment of ITensorsPackageCompilerExt #1550

Merged
merged 2 commits into from
Oct 20, 2024
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.6.21"
version = "0.6.22"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module ITensorsPackageCompilerExt
include("compile.jl")
include("precompile_itensors.jl")
end
6 changes: 0 additions & 6 deletions src/packagecompile/compile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ function compile(; backend=Algorithm"PackageCompiler"(), kwargs...)
return compile(backend; kwargs...)
end

function compile(::Algorithm; kwargs...)
return error(
"As of ITensors v0.5, you must install `PackageCompiler.jl` (`using Pkg: Pkg; Pkg.add(\"PackageCompiler\")`) and execute `using PackageCompiler` to use `ITensors.compile`.",
)
end

@doc """
ITensors.compile(; dir = "$(default_compile_dir())",
filename = "$(default_compile_filename())")
Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0"
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
4 changes: 4 additions & 0 deletions test/ext/ITensorsPackageCompilerExt/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
10 changes: 10 additions & 0 deletions test/ext/ITensorsPackageCompilerExt/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@eval module $(gensym())
using ITensors: ITensors
using PackageCompiler: PackageCompiler
using Test: @testset, @test
@testset "ITensorsPackageCompilerExt" begin
# Testing `ITensors.compile` would take too long so we just check
# that `ITensorsPackageCompilerExt` overloads `ITensors.compile`.
@test hasmethod(ITensors.compile, Tuple{ITensors.Algorithm"PackageCompiler"})
end
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ITensors.disable_threaded_blocksparse()
"threading",
"lib/ContractionSequenceOptimization",
"ext/ITensorsChainRulesCoreExt",
"ext/ITensorsPackageCompilerExt",
"ext/ITensorsVectorInterfaceExt",
]
@time for dir in dirs
Expand Down
Loading